| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Api
Contents
- Eras
- Type tags
- Cryptographic key interface
- Payment addresses
- Stake addresses
- Currency values
- Blocks
- Building transactions
- Building transactions
- Transaction bodies
- Transaction Ids
- Transaction inputs
- Transaction outputs
- Other transaction body types
- Building vs viewing transactions
- Era-dependent transaction body features
- Feature availability functions
- Fee calculation
- Script execution units
- Transaction balance
- Building transactions with automated fees and balancing
- Signing transactions
- Transaction metadata
- Certificates
- Stake pool off-chain metadata
- Scripts
- Use of a script in an era as a witness
- Script data
- Script execution units
- Serialisation
- Errors
- Node interaction
- Node operation
- Genesis file
- Special transactions
- Protocol parameter updates
Description
This module provides a library interface for interacting with Cardano as a user of the system.
It is intended to be the complete API covering everything but without exposing constructors that reveal any lower level types.
In the interest of simplicity it glosses over some details of the system. Most simple tools should be able to work just using this interface, however you can go deeper and expose the types from the underlying libraries using Cardano.Api.Byron or Cardano.Api.Shelley.
Synopsis
- data ByronEra
- data ShelleyEra
- data AllegraEra
- data MaryEra
- data AlonzoEra
- data CardanoEra era where
- class HasTypeProxy era ⇒ IsCardanoEra era where
- cardanoEra ∷ CardanoEra era
- data AnyCardanoEra where
- AnyCardanoEra ∷ IsCardanoEra era ⇒ CardanoEra era → AnyCardanoEra
- anyCardanoEra ∷ CardanoEra era → AnyCardanoEra
- data InAnyCardanoEra thing where
- InAnyCardanoEra ∷ IsCardanoEra era ⇒ CardanoEra era → thing era → InAnyCardanoEra thing
- data ShelleyBasedEra era where
- class (IsCardanoEra era, Crypto (ShelleyLedgerEra era) ~ StandardCrypto) ⇒ IsShelleyBasedEra era where
- data InAnyShelleyBasedEra thing where
- InAnyShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ ShelleyBasedEra era → thing era → InAnyShelleyBasedEra thing
- data CardanoEraStyle era where
- LegacyByronEra ∷ CardanoEraStyle ByronEra
- ShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ ShelleyBasedEra era → CardanoEraStyle era
- cardanoEraStyle ∷ CardanoEra era → CardanoEraStyle era
- type Byron = ByronEra
- type Shelley = ShelleyEra
- type Allegra = AllegraEra
- type Mary = MaryEra
- class HasTypeProxy t where
- data AsType t
- proxyToAsType ∷ Proxy t → AsType t
- class (Eq (VerificationKey keyrole), Show (VerificationKey keyrole), SerialiseAsRawBytes (Hash keyrole), HasTextEnvelope (VerificationKey keyrole), HasTextEnvelope (SigningKey keyrole)) ⇒ Key keyrole
- data family VerificationKey keyrole ∷ Type
- getVerificationKey ∷ Key keyrole ⇒ SigningKey keyrole → VerificationKey keyrole
- verificationKeyHash ∷ Key keyrole ⇒ VerificationKey keyrole → Hash keyrole
- castVerificationKey ∷ CastVerificationKeyRole keyroleA keyroleB ⇒ VerificationKey keyroleA → VerificationKey keyroleB
- castSigningKey ∷ CastSigningKeyRole keyroleA keyroleB ⇒ SigningKey keyroleA → SigningKey keyroleB
- generateSigningKey ∷ Key keyrole ⇒ AsType keyrole → IO (SigningKey keyrole)
- deterministicSigningKey ∷ Key keyrole ⇒ AsType keyrole → Seed → SigningKey keyrole
- deterministicSigningKeySeedSize ∷ Key keyrole ⇒ AsType keyrole → Word
- data family Hash keyrole ∷ Type
- castHash ∷ CastHash roleA roleB ⇒ Hash roleA → Hash roleB
- data Address addrtype
- data ByronAddr
- data ShelleyAddr
- data NetworkId
- makeByronAddress ∷ NetworkId → VerificationKey ByronKey → Address ByronAddr
- data ByronKey
- data ByronKeyLegacy
- makeShelleyAddress ∷ NetworkId → PaymentCredential → StakeAddressReference → Address ShelleyAddr
- data PaymentCredential
- newtype StakeAddressPointer = StakeAddressPointer {
- unStakeAddressPointer ∷ Ptr
- data StakeAddressReference
- data PaymentKey
- data PaymentExtendedKey
- data AddressAny
- data AddressInEra era where
- AddressInEra ∷ AddressTypeInEra addrtype era → Address addrtype → AddressInEra era
- data AddressTypeInEra addrtype era where
- byronAddressInEra ∷ Address ByronAddr → AddressInEra era
- shelleyAddressInEra ∷ IsShelleyBasedEra era ⇒ Address ShelleyAddr → AddressInEra era
- anyAddressInShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ AddressAny → AddressInEra era
- anyAddressInEra ∷ CardanoEra era → AddressAny → Maybe (AddressInEra era)
- toAddressAny ∷ Address addr → AddressAny
- makeByronAddressInEra ∷ NetworkId → VerificationKey ByronKey → AddressInEra era
- makeShelleyAddressInEra ∷ IsShelleyBasedEra era ⇒ NetworkId → PaymentCredential → StakeAddressReference → AddressInEra era
- data StakeAddress
- data StakeCredential
- makeStakeAddress ∷ NetworkId → StakeCredential → StakeAddress
- data StakeKey
- data StakeExtendedKey
- data Lovelace
- newtype Quantity = Quantity Integer
- newtype PolicyId = PolicyId ScriptHash
- scriptPolicyId ∷ Script lang → PolicyId
- newtype AssetName = AssetName ByteString
- data AssetId
- data Value
- selectAsset ∷ Value → AssetId → Quantity
- valueFromList ∷ [(AssetId, Quantity)] → Value
- valueToList ∷ Value → [(AssetId, Quantity)]
- filterValue ∷ (AssetId → Bool) → Value → Value
- negateValue ∷ Value → Value
- newtype ValueNestedRep = ValueNestedRep [ValueNestedBundle]
- data ValueNestedBundle
- valueToNestedRep ∷ Value → ValueNestedRep
- valueFromNestedRep ∷ ValueNestedRep → Value
- quantityToLovelace ∷ Quantity → Lovelace
- lovelaceToQuantity ∷ Lovelace → Quantity
- selectLovelace ∷ Value → Lovelace
- lovelaceToValue ∷ Lovelace → Value
- valueToLovelace ∷ Value → Maybe Lovelace
- data Block era where
- pattern Block ∷ BlockHeader → [Tx era] → Block era
- data BlockHeader = BlockHeader !SlotNo !(Hash BlockHeader) !BlockNo
- data ChainPoint
- newtype EpochNo = EpochNo {}
- data ChainTip
- newtype BlockNo = BlockNo {}
- chainTipToChainPoint ∷ ChainTip → ChainPoint
- data TxBody era where
- pattern TxBody ∷ TxBodyContent ViewTx era → TxBody era
- makeTransactionBody ∷ ∀ era. IsCardanoEra era ⇒ TxBodyContent BuildTx era → Either (TxBodyError era) (TxBody era)
- data TxBodyContent build era = TxBodyContent {
- txIns ∷ TxIns build era
- txInsCollateral ∷ TxInsCollateral era
- txOuts ∷ [TxOut era]
- txFee ∷ TxFee era
- txValidityRange ∷ (TxValidityLowerBound era, TxValidityUpperBound era)
- txMetadata ∷ TxMetadataInEra era
- txAuxScripts ∷ TxAuxScripts era
- txExtraScriptData ∷ BuildTxWith build (TxExtraScriptData era)
- txExtraKeyWits ∷ TxExtraKeyWitnesses era
- txProtocolParams ∷ BuildTxWith build (Maybe ProtocolParameters)
- txWithdrawals ∷ TxWithdrawals build era
- txCertificates ∷ TxCertificates build era
- txUpdateProposal ∷ TxUpdateProposal era
- txMintValue ∷ TxMintValue build era
- data TxBodyError era
- = TxBodyEmptyTxIns
- | TxBodyEmptyTxInsCollateral
- | TxBodyEmptyTxOuts
- | TxBodyOutputNegative Quantity (TxOut era)
- | TxBodyOutputOverflow Quantity (TxOut era)
- | TxBodyMetadataError [(Word64, TxMetadataRangeError)]
- | TxBodyMintAdaError
- | TxBodyAuxDataHashInvalidError
- | TxBodyMintBeforeMaryError
- | TxBodyMissingProtocolParams
- newtype TxId = TxId (Hash StandardCrypto EraIndependentTxBody)
- getTxId ∷ ∀ era. TxBody era → TxId
- data TxIn = TxIn TxId TxIx
- newtype TxIx = TxIx Word
- data TxOut era = TxOut (AddressInEra era) (TxOutValue era) (TxOutDatumHash era)
- data TxOutValue era where
- TxOutAdaOnly ∷ OnlyAdaSupportedInEra era → Lovelace → TxOutValue era
- TxOutValue ∷ MultiAssetSupportedInEra era → Value → TxOutValue era
- serialiseAddressForTxOut ∷ AddressInEra era → Text
- data TxOutDatumHash era where
- TxOutDatumHashNone ∷ TxOutDatumHash era
- TxOutDatumHash ∷ ScriptDataSupportedInEra era → Hash ScriptData → TxOutDatumHash era
- data TxInsCollateral era where
- TxInsCollateralNone ∷ TxInsCollateral era
- TxInsCollateral ∷ CollateralSupportedInEra era → [TxIn] → TxInsCollateral era
- data TxFee era where
- TxFeeImplicit ∷ TxFeesImplicitInEra era → TxFee era
- TxFeeExplicit ∷ TxFeesExplicitInEra era → Lovelace → TxFee era
- data TxValidityLowerBound era where
- data TxValidityUpperBound era where
- newtype SlotNo = SlotNo {}
- newtype EpochSlots = EpochSlots {}
- data TxMetadataInEra era where
- TxMetadataNone ∷ TxMetadataInEra era
- TxMetadataInEra ∷ TxMetadataSupportedInEra era → TxMetadata → TxMetadataInEra era
- data TxAuxScripts era where
- TxAuxScriptsNone ∷ TxAuxScripts era
- TxAuxScripts ∷ AuxScriptsSupportedInEra era → [ScriptInEra era] → TxAuxScripts era
- data TxExtraScriptData era where
- data TxExtraKeyWitnesses era where
- data TxWithdrawals build era where
- TxWithdrawalsNone ∷ TxWithdrawals build era
- TxWithdrawals ∷ WithdrawalsSupportedInEra era → [(StakeAddress, Lovelace, BuildTxWith build (Witness WitCtxStake era))] → TxWithdrawals build era
- data TxCertificates build era where
- TxCertificatesNone ∷ TxCertificates build era
- TxCertificates ∷ CertificatesSupportedInEra era → [Certificate] → BuildTxWith build (Map StakeCredential (Witness WitCtxStake era)) → TxCertificates build era
- data TxUpdateProposal era where
- data TxMintValue build era where
- TxMintNone ∷ TxMintValue build era
- TxMintValue ∷ MultiAssetSupportedInEra era → Value → BuildTxWith build (Map PolicyId (ScriptWitness WitCtxMint era)) → TxMintValue build era
- data BuildTxWith build a where
- ViewTx ∷ BuildTxWith ViewTx a
- BuildTxWith ∷ a → BuildTxWith BuildTx a
- data BuildTx
- data ViewTx
- data CollateralSupportedInEra era where
- data MultiAssetSupportedInEra era where
- data OnlyAdaSupportedInEra era where
- data TxFeesExplicitInEra era where
- data TxFeesImplicitInEra era where
- data ValidityUpperBoundSupportedInEra era where
- data ValidityNoUpperBoundSupportedInEra era where
- ValidityNoUpperBoundInByronEra ∷ ValidityNoUpperBoundSupportedInEra ByronEra
- ValidityNoUpperBoundInAllegraEra ∷ ValidityNoUpperBoundSupportedInEra AllegraEra
- ValidityNoUpperBoundInMaryEra ∷ ValidityNoUpperBoundSupportedInEra MaryEra
- ValidityNoUpperBoundInAlonzoEra ∷ ValidityNoUpperBoundSupportedInEra AlonzoEra
- data ValidityLowerBoundSupportedInEra era where
- data TxMetadataSupportedInEra era where
- data AuxScriptsSupportedInEra era where
- data TxExtraKeyWitnessesSupportedInEra era where
- data ScriptDataSupportedInEra era where
- data WithdrawalsSupportedInEra era where
- data CertificatesSupportedInEra era where
- data UpdateProposalSupportedInEra era where
- collateralSupportedInEra ∷ CardanoEra era → Maybe (CollateralSupportedInEra era)
- multiAssetSupportedInEra ∷ CardanoEra era → Either (OnlyAdaSupportedInEra era) (MultiAssetSupportedInEra era)
- txFeesExplicitInEra ∷ CardanoEra era → Either (TxFeesImplicitInEra era) (TxFeesExplicitInEra era)
- validityUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityUpperBoundSupportedInEra era)
- validityNoUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityNoUpperBoundSupportedInEra era)
- validityLowerBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityLowerBoundSupportedInEra era)
- txMetadataSupportedInEra ∷ CardanoEra era → Maybe (TxMetadataSupportedInEra era)
- auxScriptsSupportedInEra ∷ CardanoEra era → Maybe (AuxScriptsSupportedInEra era)
- extraKeyWitnessesSupportedInEra ∷ CardanoEra era → Maybe (TxExtraKeyWitnessesSupportedInEra era)
- withdrawalsSupportedInEra ∷ CardanoEra era → Maybe (WithdrawalsSupportedInEra era)
- certificatesSupportedInEra ∷ CardanoEra era → Maybe (CertificatesSupportedInEra era)
- updateProposalSupportedInEra ∷ CardanoEra era → Maybe (UpdateProposalSupportedInEra era)
- scriptDataSupportedInEra ∷ CardanoEra era → Maybe (ScriptDataSupportedInEra era)
- transactionFee ∷ ∀ era. IsShelleyBasedEra era ⇒ Natural → Natural → Tx era → Lovelace
- estimateTransactionFee ∷ ∀ era. IsShelleyBasedEra era ⇒ NetworkId → Natural → Natural → Tx era → Int → Int → Int → Int → Lovelace
- evaluateTransactionFee ∷ ∀ era. IsShelleyBasedEra era ⇒ ProtocolParameters → TxBody era → Word → Word → Lovelace
- estimateTransactionKeyWitnessCount ∷ TxBodyContent BuildTx era → Word
- evaluateTransactionExecutionUnits ∷ ∀ era mode. EraInMode era mode → SystemStart → EraHistory mode → ProtocolParameters → UTxO era → TxBody era → Either TransactionValidityIntervalError (Map ScriptWitnessIndex (Either ScriptExecutionError ExecutionUnits))
- data ScriptExecutionError
- data TransactionValidityIntervalError
- evaluateTransactionBalance ∷ ∀ era. IsShelleyBasedEra era ⇒ ProtocolParameters → Set PoolId → UTxO era → TxBody era → TxOutValue era
- makeTransactionBodyAutoBalance ∷ ∀ era mode. IsShelleyBasedEra era ⇒ EraInMode era mode → SystemStart → EraHistory mode → ProtocolParameters → Set PoolId → UTxO era → TxBodyContent BuildTx era → AddressInEra era → Maybe Word → Either (TxBodyErrorAutoBalance era) (TxBody era)
- data TxBodyErrorAutoBalance era
- = TxBodyError (TxBodyError era)
- | TxBodyScriptExecutionError [(ScriptWitnessIndex, ScriptExecutionError)]
- | TxBodyErrorAssetBalanceWrong Value
- | TxBodyErrorAdaBalanceNegative Lovelace
- | TxBodyErrorAdaBalanceTooSmall Lovelace
- | TxBodyErrorByronEraNotSupported
- | TxBodyErrorMissingParamMinUTxO
- | TxBodyErrorMissingParamCostPerWord
- | TxBodyErrorValidityInterval TransactionValidityIntervalError
- data Tx era where
- pattern Tx ∷ Era era ⇒ TxBody era → [KeyWitness era] → Tx era
- getTxBody ∷ ∀ era. Tx era → TxBody era
- getTxWitnesses ∷ ∀ era. Tx era → [KeyWitness era]
- signByronTransaction ∷ NetworkId → TxBody ByronEra → [SigningKey ByronKey] → Tx ByronEra
- signShelleyTransaction ∷ IsShelleyBasedEra era ⇒ TxBody era → [ShelleyWitnessSigningKey] → Tx era
- makeSignedTransaction ∷ ∀ era. [KeyWitness era] → TxBody era → Tx era
- data KeyWitness era
- makeByronKeyWitness ∷ ∀ key. IsByronKey key ⇒ NetworkId → TxBody ByronEra → SigningKey key → KeyWitness ByronEra
- data ShelleyWitnessSigningKey
- = WitnessPaymentKey (SigningKey PaymentKey)
- | WitnessPaymentExtendedKey (SigningKey PaymentExtendedKey)
- | WitnessStakeKey (SigningKey StakeKey)
- | WitnessStakeExtendedKey (SigningKey StakeExtendedKey)
- | WitnessStakePoolKey (SigningKey StakePoolKey)
- | WitnessGenesisKey (SigningKey GenesisKey)
- | WitnessGenesisExtendedKey (SigningKey GenesisExtendedKey)
- | WitnessGenesisDelegateKey (SigningKey GenesisDelegateKey)
- | WitnessGenesisDelegateExtendedKey (SigningKey GenesisDelegateExtendedKey)
- | WitnessGenesisUTxOKey (SigningKey GenesisUTxOKey)
- makeShelleyKeyWitness ∷ ∀ era. IsShelleyBasedEra era ⇒ TxBody era → ShelleyWitnessSigningKey → KeyWitness era
- makeShelleyBootstrapWitness ∷ ∀ era. IsShelleyBasedEra era ⇒ WitnessNetworkIdOrByronAddress → TxBody era → SigningKey ByronKey → KeyWitness era
- newtype TxMetadata = TxMetadata (Map Word64 TxMetadataValue)
- data TxMetadataValue
- makeTransactionMetadata ∷ Map Word64 TxMetadataValue → TxMetadata
- validateTxMetadata ∷ TxMetadata → Either [(Word64, TxMetadataRangeError)] ()
- data TxMetadataRangeError
- data TxMetadataJsonSchema
- metadataFromJson ∷ TxMetadataJsonSchema → Value → Either TxMetadataJsonError TxMetadata
- metadataToJson ∷ TxMetadataJsonSchema → TxMetadata → Value
- metadataValueToJsonNoSchema ∷ TxMetadataValue → Value
- data TxMetadataJsonError
- data TxMetadataJsonSchemaError
- = TxMetadataJsonNullNotAllowed
- | TxMetadataJsonBoolNotAllowed
- | TxMetadataJsonNumberNotInteger !Double
- | TxMetadataJsonNotObject !Value
- | TxMetadataJsonBadObject ![(Text, Value)]
- | TxMetadataJsonBadMapPair !Value
- | TxMetadataJsonTypeMismatch !Text !Value
- data Certificate
- makeStakeAddressRegistrationCertificate ∷ StakeCredential → Certificate
- makeStakeAddressDeregistrationCertificate ∷ StakeCredential → Certificate
- makeStakeAddressDelegationCertificate ∷ StakeCredential → PoolId → Certificate
- makeStakePoolRegistrationCertificate ∷ StakePoolParameters → Certificate
- makeStakePoolRetirementCertificate ∷ PoolId → EpochNo → Certificate
- data StakePoolParameters
- data StakePoolRelay
- data StakePoolMetadataReference
- data StakePoolMetadata
- validateAndHashStakePoolMetadata ∷ ByteString → Either StakePoolMetadataValidationError (StakePoolMetadata, Hash StakePoolMetadata)
- data StakePoolMetadataValidationError
- data SimpleScriptV1
- data SimpleScriptV2
- data PlutusScriptV1
- data ScriptLanguage lang where
- SimpleScriptLanguage ∷ SimpleScriptVersion lang → ScriptLanguage lang
- PlutusScriptLanguage ∷ PlutusScriptVersion lang → ScriptLanguage lang
- data SimpleScriptVersion lang where
- data PlutusScriptVersion lang where
- data AnyScriptLanguage where
- data AnyPlutusScriptVersion where
- class HasTypeProxy lang ⇒ IsScriptLanguage lang where
- scriptLanguage ∷ ScriptLanguage lang
- class IsScriptLanguage lang ⇒ IsSimpleScriptLanguage lang where
- data Script lang where
- SimpleScript ∷ !(SimpleScriptVersion lang) → !(SimpleScript lang) → Script lang
- PlutusScript ∷ !(PlutusScriptVersion lang) → !(PlutusScript lang) → Script lang
- data ScriptInAnyLang where
- ScriptInAnyLang ∷ ScriptLanguage lang → Script lang → ScriptInAnyLang
- toScriptInAnyLang ∷ Script lang → ScriptInAnyLang
- data ScriptInEra era where
- ScriptInEra ∷ ScriptLanguageInEra lang era → Script lang → ScriptInEra era
- toScriptInEra ∷ CardanoEra era → ScriptInAnyLang → Maybe (ScriptInEra era)
- eraOfScriptInEra ∷ ScriptInEra era → ShelleyBasedEra era
- data WitCtxTxIn
- data WitCtxMint
- data WitCtxStake
- data WitCtx witctx where
- data ScriptWitness witctx era where
- SimpleScriptWitness ∷ ScriptLanguageInEra lang era → SimpleScriptVersion lang → SimpleScript lang → ScriptWitness witctx era
- PlutusScriptWitness ∷ ScriptLanguageInEra lang era → PlutusScriptVersion lang → PlutusScript lang → ScriptDatum witctx → ScriptRedeemer → ExecutionUnits → ScriptWitness witctx era
- data Witness witctx era where
- KeyWitness ∷ KeyWitnessInCtx witctx → Witness witctx era
- ScriptWitness ∷ ScriptWitnessInCtx witctx → ScriptWitness witctx era → Witness witctx era
- data KeyWitnessInCtx witctx where
- data ScriptWitnessInCtx witctx where
- data ScriptDatum witctx where
- type ScriptRedeemer = ScriptData
- scriptWitnessScript ∷ ScriptWitness witctx era → ScriptInEra era
- data ScriptLanguageInEra lang era where
- SimpleScriptV1InShelley ∷ ScriptLanguageInEra SimpleScriptV1 ShelleyEra
- SimpleScriptV1InAllegra ∷ ScriptLanguageInEra SimpleScriptV1 AllegraEra
- SimpleScriptV1InMary ∷ ScriptLanguageInEra SimpleScriptV1 MaryEra
- SimpleScriptV1InAlonzo ∷ ScriptLanguageInEra SimpleScriptV1 AlonzoEra
- SimpleScriptV2InAllegra ∷ ScriptLanguageInEra SimpleScriptV2 AllegraEra
- SimpleScriptV2InMary ∷ ScriptLanguageInEra SimpleScriptV2 MaryEra
- SimpleScriptV2InAlonzo ∷ ScriptLanguageInEra SimpleScriptV2 AlonzoEra
- PlutusScriptV1InAlonzo ∷ ScriptLanguageInEra PlutusScriptV1 AlonzoEra
- scriptLanguageSupportedInEra ∷ CardanoEra era → ScriptLanguage lang → Maybe (ScriptLanguageInEra lang era)
- languageOfScriptLanguageInEra ∷ ScriptLanguageInEra lang era → ScriptLanguage lang
- eraOfScriptLanguageInEra ∷ ScriptLanguageInEra lang era → ShelleyBasedEra era
- data SimpleScript lang where
- RequireSignature ∷ !(Hash PaymentKey) → SimpleScript lang
- RequireTimeBefore ∷ !(TimeLocksSupported lang) → !SlotNo → SimpleScript lang
- RequireTimeAfter ∷ !(TimeLocksSupported lang) → !SlotNo → SimpleScript lang
- RequireAllOf ∷ [SimpleScript lang] → SimpleScript lang
- RequireAnyOf ∷ [SimpleScript lang] → SimpleScript lang
- RequireMOf ∷ Int → [SimpleScript lang] → SimpleScript lang
- data TimeLocksSupported lang where
- timeLocksSupported ∷ SimpleScriptVersion lang → Maybe (TimeLocksSupported lang)
- adjustSimpleScriptVersion ∷ SimpleScriptVersion lang' → SimpleScript lang → Maybe (SimpleScript lang')
- data PlutusScript lang
- examplePlutusScriptAlwaysSucceeds ∷ WitCtx witctx → PlutusScript PlutusScriptV1
- examplePlutusScriptAlwaysFails ∷ WitCtx witctx → PlutusScript PlutusScriptV1
- data ScriptData
- hashScriptData ∷ ScriptData → Hash ScriptData
- data ScriptDataRangeError
- validateScriptData ∷ ScriptData → Either ScriptDataRangeError ()
- data ScriptDataJsonSchema
- scriptDataFromJson ∷ ScriptDataJsonSchema → Value → Either ScriptDataJsonError ScriptData
- scriptDataToJson ∷ ScriptDataJsonSchema → ScriptData → Value
- data ScriptDataJsonError
- data ScriptDataJsonSchemaError
- = ScriptDataJsonNullNotAllowed
- | ScriptDataJsonBoolNotAllowed
- | ScriptDataJsonNumberNotInteger !Double
- | ScriptDataJsonNotObject !Value
- | ScriptDataJsonBadObject ![(Text, Value)]
- | ScriptDataJsonBadMapPair !Value
- | ScriptDataJsonTypeMismatch !Text !Value
- data ExecutionUnits = ExecutionUnits {}
- data ExecutionUnitPrices = ExecutionUnitPrices {}
- newtype CostModel = CostModel (Map Text Integer)
- validateCostModel ∷ PlutusScriptVersion lang → CostModel → Either InvalidCostModel ()
- data ScriptHash
- hashScript ∷ Script lang → ScriptHash
- class HasTypeProxy a ⇒ SerialiseAsCBOR a
- class Typeable a ⇒ ToCBOR a
- class Typeable a ⇒ FromCBOR a
- serialiseToCBOR ∷ SerialiseAsCBOR a ⇒ a → ByteString
- deserialiseFromCBOR ∷ SerialiseAsCBOR a ⇒ AsType a → ByteString → Either DecoderError a
- class ToJSON a
- class FromJSON a
- serialiseToJSON ∷ ToJSON a ⇒ a → ByteString
- deserialiseFromJSON ∷ FromJSON a ⇒ AsType a → ByteString → Either JsonDecodeError a
- newtype JsonDecodeError = JsonDecodeError String
- readFileJSON ∷ FromJSON a ⇒ AsType a → FilePath → IO (Either (FileError JsonDecodeError) a)
- writeFileJSON ∷ ToJSON a ⇒ FilePath → a → IO (Either (FileError ()) ())
- prettyPrintJSON ∷ ToJSON a ⇒ a → ByteString
- class (HasTypeProxy a, SerialiseAsRawBytes a) ⇒ SerialiseAsBech32 a
- serialiseToBech32 ∷ SerialiseAsBech32 a ⇒ a → Text
- deserialiseFromBech32 ∷ SerialiseAsBech32 a ⇒ AsType a → Text → Either Bech32DecodeError a
- deserialiseAnyOfFromBech32 ∷ ∀ b. [FromSomeType SerialiseAsBech32 b] → Text → Either Bech32DecodeError b
- data Bech32DecodeError
- = Bech32DecodingError !DecodingError
- | Bech32UnexpectedPrefix !Text !(Set Text)
- | Bech32DataPartToBytesError !Text
- | Bech32DeserialiseFromBytesError !ByteString
- | Bech32WrongPrefix !Text !Text
- class HasTypeProxy addr ⇒ SerialiseAddress addr
- serialiseAddress ∷ SerialiseAddress addr ⇒ addr → Text
- deserialiseAddress ∷ SerialiseAddress addr ⇒ AsType addr → Text → Maybe addr
- class HasTypeProxy a ⇒ SerialiseAsRawBytes a
- serialiseToRawBytes ∷ SerialiseAsRawBytes a ⇒ a → ByteString
- deserialiseFromRawBytes ∷ SerialiseAsRawBytes a ⇒ AsType a → ByteString → Maybe a
- serialiseToRawBytesHex ∷ SerialiseAsRawBytes a ⇒ a → ByteString
- deserialiseFromRawBytesHex ∷ SerialiseAsRawBytes a ⇒ AsType a → ByteString → Maybe a
- serialiseToRawBytesHexText ∷ SerialiseAsRawBytes a ⇒ a → Text
- class SerialiseAsCBOR a ⇒ HasTextEnvelope a where
- data TextEnvelope = TextEnvelope {}
- newtype TextEnvelopeType = TextEnvelopeType String
- data TextEnvelopeDescr
- data TextEnvelopeError
- = TextEnvelopeTypeError ![TextEnvelopeType] !TextEnvelopeType
- | TextEnvelopeDecodeError !DecoderError
- | TextEnvelopeAesonDecodeError !String
- textEnvelopeRawCBOR ∷ TextEnvelope → ByteString
- serialiseToTextEnvelope ∷ ∀ a. HasTextEnvelope a ⇒ Maybe TextEnvelopeDescr → a → TextEnvelope
- deserialiseFromTextEnvelope ∷ HasTextEnvelope a ⇒ AsType a → TextEnvelope → Either TextEnvelopeError a
- readFileTextEnvelope ∷ HasTextEnvelope a ⇒ AsType a → FilePath → IO (Either (FileError TextEnvelopeError) a)
- writeFileTextEnvelope ∷ HasTextEnvelope a ⇒ FilePath → Maybe TextEnvelopeDescr → a → IO (Either (FileError ()) ())
- writeFileTextEnvelopeWithOwnerPermissions ∷ HasTextEnvelope a ⇒ FilePath → Maybe TextEnvelopeDescr → a → IO (Either (FileError ()) ())
- readTextEnvelopeFromFile ∷ FilePath → IO (Either (FileError TextEnvelopeError) TextEnvelope)
- readTextEnvelopeOfTypeFromFile ∷ TextEnvelopeType → FilePath → IO (Either (FileError TextEnvelopeError) TextEnvelope)
- data FromSomeType (c ∷ Type → Constraint) b where
- FromSomeType ∷ c a ⇒ AsType a → (a → b) → FromSomeType c b
- deserialiseFromTextEnvelopeAnyOf ∷ [FromSomeType HasTextEnvelope b] → TextEnvelope → Either TextEnvelopeError b
- readFileTextEnvelopeAnyOf ∷ [FromSomeType HasTextEnvelope b] → FilePath → IO (Either (FileError TextEnvelopeError) b)
- class Show e ⇒ Error e where
- displayError ∷ e → String
- throwErrorAsException ∷ Error e ⇒ e → IO a
- data FileError e
- data Env = Env {
- envLedgerConfig ∷ HardForkLedgerConfig (CardanoEras StandardCrypto)
- envProtocolConfig ∷ ConsensusConfig (HardForkProtocol (CardanoEras StandardCrypto))
- envSecurityParam ∷ Env → Word64
- newtype LedgerState where
- LedgerState {
- clsState ∷ LedgerState (HardForkBlock (CardanoEras StandardCrypto))
- pattern LedgerStateByron ∷ LedgerState ByronBlock → LedgerState
- pattern LedgerStateShelley ∷ LedgerState (ShelleyBlock (ShelleyEra StandardCrypto)) → LedgerState
- pattern LedgerStateAllegra ∷ LedgerState (ShelleyBlock (AllegraEra StandardCrypto)) → LedgerState
- pattern LedgerStateMary ∷ LedgerState (ShelleyBlock (MaryEra StandardCrypto)) → LedgerState
- LedgerState {
- initialLedgerState ∷ FilePath → ExceptT InitialLedgerStateError IO (Env, LedgerState)
- applyBlock ∷ Env → LedgerState → Bool → Block era → Either Text LedgerState
- foldBlocks ∷ ∀ a. FilePath → FilePath → NetworkId → Bool → a → (Env → LedgerState → BlockInMode CardanoMode → a → IO a) → ExceptT FoldBlocksError IO a
- data FoldBlocksError
- data GenesisConfigError
- = NEError !Text
- | NEByronConfig !FilePath !ConfigurationError
- | NEShelleyConfig !FilePath !Text
- | NECardanoConfig !Text
- data InitialLedgerStateError
- renderFoldBlocksError ∷ FoldBlocksError → Text
- renderGenesisConfigError ∷ GenesisConfigError → Text
- renderInitialLedgerStateError ∷ InitialLedgerStateError → Text
- connectToLocalNode ∷ LocalNodeConnectInfo mode → LocalNodeClientProtocolsInMode mode → IO ()
- connectToLocalNodeWithVersion ∷ LocalNodeConnectInfo mode → (NodeToClientVersion → LocalNodeClientProtocolsInMode mode) → IO ()
- data LocalNodeConnectInfo mode = LocalNodeConnectInfo {}
- data AnyConsensusMode where
- renderMode ∷ AnyConsensusMode → Text
- data ConsensusMode mode where
- consensusModeOnly ∷ ConsensusModeParams mode → ConsensusMode mode
- data ConsensusModeIsMultiEra mode where
- data AnyConsensusModeParams where
- data ConsensusModeParams mode where
- data EraInMode era mode where
- ByronEraInByronMode ∷ EraInMode ByronEra ByronMode
- ShelleyEraInShelleyMode ∷ EraInMode ShelleyEra ShelleyMode
- ByronEraInCardanoMode ∷ EraInMode ByronEra CardanoMode
- ShelleyEraInCardanoMode ∷ EraInMode ShelleyEra CardanoMode
- AllegraEraInCardanoMode ∷ EraInMode AllegraEra CardanoMode
- MaryEraInCardanoMode ∷ EraInMode MaryEra CardanoMode
- AlonzoEraInCardanoMode ∷ EraInMode AlonzoEra CardanoMode
- toEraInMode ∷ CardanoEra era → ConsensusMode mode → Maybe (EraInMode era mode)
- data LocalNodeClientProtocols block point tip tx txerr query m = LocalNodeClientProtocols {
- localChainSyncClient ∷ LocalChainSyncClient block point tip m
- localTxSubmissionClient ∷ Maybe (LocalTxSubmissionClient tx txerr m ())
- localStateQueryClient ∷ Maybe (LocalStateQueryClient block point query m ())
- data LocalChainSyncClient block point tip m
- = NoLocalChainSyncClient
- | LocalChainSyncClientPipelined (ChainSyncClientPipelined block point tip m ())
- | LocalChainSyncClient (ChainSyncClient block point tip m ())
- data CardanoMode
- newtype ChainSyncClient header point tip (m ∷ Type → Type) a = ChainSyncClient {
- runChainSyncClient ∷ m (ClientStIdle header point tip m a)
- newtype ChainSyncClientPipelined header point tip (m ∷ Type → Type) a = ChainSyncClientPipelined {
- runChainSyncClientPipelined ∷ m (ClientPipelinedStIdle 'Z header point tip m a)
- data BlockInMode mode where
- BlockInMode ∷ Block era → EraInMode era mode → BlockInMode mode
- type LocalNodeClientProtocolsInMode mode = LocalNodeClientProtocols (BlockInMode mode) ChainPoint ChainTip (TxInMode mode) (TxValidationErrorInMode mode) (QueryInMode mode) IO
- data LocalTxSubmissionClient tx reject (m ∷ Type → Type) a
- data TxInMode mode where
- data TxValidationErrorInMode mode where
- TxValidationErrorInMode ∷ TxValidationError era → EraInMode era mode → TxValidationErrorInMode mode
- TxValidationEraMismatch ∷ EraMismatch → TxValidationErrorInMode mode
- runLocalTxSubmissionClient ∷ LocalTxSubmissionClient tx reject m a → m (LocalTxClientStIdle tx reject m a)
- submitTxToNodeLocal ∷ ∀ mode. LocalNodeConnectInfo mode → TxInMode mode → IO (SubmitResult (TxValidationErrorInMode mode))
- newtype LocalStateQueryClient block point (query ∷ Type → Type) (m ∷ Type → Type) a = LocalStateQueryClient {
- runLocalStateQueryClient ∷ m (ClientStIdle block point query m a)
- data QueryInMode mode result where
- QueryCurrentEra ∷ ConsensusModeIsMultiEra mode → QueryInMode mode AnyCardanoEra
- QueryInEra ∷ EraInMode era mode → QueryInEra era result → QueryInMode mode (Either EraMismatch result)
- QueryEraHistory ∷ ConsensusModeIsMultiEra mode → QueryInMode mode (EraHistory mode)
- QuerySystemStart ∷ QueryInMode mode SystemStart
- data QueryInEra era result where
- QueryByronUpdateState ∷ QueryInEra ByronEra ByronUpdateState
- QueryInShelleyBasedEra ∷ ShelleyBasedEra era → QueryInShelleyBasedEra era result → QueryInEra era result
- data QueryInShelleyBasedEra era result where
- QueryChainPoint ∷ QueryInShelleyBasedEra era ChainPoint
- QueryEpoch ∷ QueryInShelleyBasedEra era EpochNo
- QueryGenesisParameters ∷ QueryInShelleyBasedEra era GenesisParameters
- QueryProtocolParameters ∷ QueryInShelleyBasedEra era ProtocolParameters
- QueryProtocolParametersUpdate ∷ QueryInShelleyBasedEra era (Map (Hash GenesisKey) ProtocolParametersUpdate)
- QueryStakeDistribution ∷ QueryInShelleyBasedEra era (Map (Hash StakePoolKey) Rational)
- QueryUTxO ∷ QueryUTxOFilter → QueryInShelleyBasedEra era (UTxO era)
- QueryStakeAddresses ∷ Set StakeCredential → NetworkId → QueryInShelleyBasedEra era (Map StakeAddress Lovelace, Map StakeAddress PoolId)
- QueryStakePools ∷ QueryInShelleyBasedEra era (Set PoolId)
- QueryStakePoolParameters ∷ Set PoolId → QueryInShelleyBasedEra era (Map PoolId StakePoolParameters)
- QueryDebugLedgerState ∷ QueryInShelleyBasedEra era (SerialisedDebugLedgerState era)
- QueryProtocolState ∷ QueryInShelleyBasedEra era (ProtocolState era)
- data QueryUTxOFilter
- newtype UTxO era = UTxO (Map TxIn (TxOut era))
- queryNodeLocalState ∷ ∀ mode result. LocalNodeConnectInfo mode → Maybe ChainPoint → QueryInMode mode result → IO (Either AcquireFailure result)
- data EraHistory mode where
- EraHistory ∷ ConsensusBlockForMode mode ~ HardForkBlock xs ⇒ ConsensusMode mode → Interpreter xs → EraHistory mode
- getProgress ∷ SlotNo → EraHistory mode → Either PastHorizonException (RelativeTime, SlotLength)
- getLocalChainTip ∷ LocalNodeConnectInfo mode → IO ChainTip
- data OperationalCertificate
- data OperationalCertificateIssueCounter
- data OperationalCertIssueError
- issueOperationalCertificate ∷ VerificationKey KesKey → Either (SigningKey StakePoolKey) (SigningKey GenesisDelegateExtendedKey) → KESPeriod → OperationalCertificateIssueCounter → Either OperationalCertIssueError (OperationalCertificate, OperationalCertificateIssueCounter)
- data GenesisKey
- data GenesisExtendedKey
- data GenesisDelegateKey
- data GenesisDelegateExtendedKey
- data GenesisUTxOKey
- genesisUTxOPseudoTxIn ∷ NetworkId → Hash GenesisUTxOKey → TxIn
- data GenesisParameters = GenesisParameters {
- protocolParamSystemStart ∷ UTCTime
- protocolParamNetworkId ∷ NetworkId
- protocolParamActiveSlotsCoefficient ∷ Rational
- protocolParamSecurity ∷ Int
- protocolParamEpochLength ∷ EpochSize
- protocolParamSlotLength ∷ NominalDiffTime
- protocolParamSlotsPerKESPeriod ∷ Int
- protocolParamMaxKESEvolutions ∷ Int
- protocolParamUpdateQuorum ∷ Int
- protocolParamMaxLovelaceSupply ∷ Lovelace
- protocolInitialUpdateableProtocolParameters ∷ ProtocolParameters
- makeMIRCertificate ∷ MIRPot → MIRTarget → Certificate
- makeGenesisKeyDelegationCertificate ∷ Hash GenesisKey → Hash GenesisDelegateKey → Hash VrfKey → Certificate
- data MIRTarget
- data UpdateProposal = UpdateProposal !(Map (Hash GenesisKey) ProtocolParametersUpdate) !EpochNo
- data ProtocolParametersUpdate = ProtocolParametersUpdate {
- protocolUpdateProtocolVersion ∷ Maybe (Natural, Natural)
- protocolUpdateDecentralization ∷ Maybe Rational
- protocolUpdateExtraPraosEntropy ∷ Maybe (Maybe PraosNonce)
- protocolUpdateMaxBlockHeaderSize ∷ Maybe Natural
- protocolUpdateMaxBlockBodySize ∷ Maybe Natural
- protocolUpdateMaxTxSize ∷ Maybe Natural
- protocolUpdateTxFeeFixed ∷ Maybe Natural
- protocolUpdateTxFeePerByte ∷ Maybe Natural
- protocolUpdateMinUTxOValue ∷ Maybe Lovelace
- protocolUpdateStakeAddressDeposit ∷ Maybe Lovelace
- protocolUpdateStakePoolDeposit ∷ Maybe Lovelace
- protocolUpdateMinPoolCost ∷ Maybe Lovelace
- protocolUpdatePoolRetireMaxEpoch ∷ Maybe EpochNo
- protocolUpdateStakePoolTargetNum ∷ Maybe Natural
- protocolUpdatePoolPledgeInfluence ∷ Maybe Rational
- protocolUpdateMonetaryExpansion ∷ Maybe Rational
- protocolUpdateTreasuryCut ∷ Maybe Rational
- protocolUpdateUTxOCostPerWord ∷ Maybe Lovelace
- protocolUpdateCostModels ∷ Map AnyPlutusScriptVersion CostModel
- protocolUpdatePrices ∷ Maybe ExecutionUnitPrices
- protocolUpdateMaxTxExUnits ∷ Maybe ExecutionUnits
- protocolUpdateMaxBlockExUnits ∷ Maybe ExecutionUnits
- protocolUpdateMaxValueSize ∷ Maybe Natural
- protocolUpdateCollateralPercent ∷ Maybe Natural
- protocolUpdateMaxCollateralInputs ∷ Maybe Natural
- makeShelleyUpdateProposal ∷ ProtocolParametersUpdate → [Hash GenesisKey] → EpochNo → UpdateProposal
- data PraosNonce
- makePraosNonce ∷ ByteString → PraosNonce
- newtype NetworkMagic = NetworkMagic {}
- toNetworkMagic ∷ NetworkId → NetworkMagic
- data SomeNodeClientProtocol where
- SomeNodeClientProtocol ∷ (RunNode blk, ProtocolClient blk) ⇒ ProtocolClientInfoArgs blk → SomeNodeClientProtocol
- newtype SlotsInEpoch = SlotsInEpoch Word64
- newtype SlotsToEpochEnd = SlotsToEpochEnd Word64
- slotToEpoch ∷ SlotNo → EraHistory mode → Either PastHorizonException (EpochNo, SlotsInEpoch, SlotsToEpochEnd)
- data NodeToClientVersion
Eras
A type used as a tag to distinguish the Byron era.
Instances
| HasTypeProxy ByronEra Source # | |
| IsCardanoEra ByronEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| data AsType ByronEra Source # | |
Defined in Cardano.Api.Eras | |
data ShelleyEra Source #
A type used as a tag to distinguish the Shelley era.
Instances
| HasTypeProxy ShelleyEra Source # | |
Defined in Cardano.Api.Eras Associated Types data AsType ShelleyEra Source # Methods proxyToAsType ∷ Proxy ShelleyEra → AsType ShelleyEra Source # | |
| IsShelleyBasedEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| data AsType ShelleyEra Source # | |
Defined in Cardano.Api.Eras | |
data AllegraEra Source #
A type used as a tag to distinguish the Allegra era.
Instances
| HasTypeProxy AllegraEra Source # | |
Defined in Cardano.Api.Eras Associated Types data AsType AllegraEra Source # Methods proxyToAsType ∷ Proxy AllegraEra → AsType AllegraEra Source # | |
| IsShelleyBasedEra AllegraEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra AllegraEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| data AsType AllegraEra Source # | |
Defined in Cardano.Api.Eras | |
A type used as a tag to distinguish the Mary era.
Instances
| HasTypeProxy MaryEra Source # | |
| IsShelleyBasedEra MaryEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra MaryEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| data AsType MaryEra Source # | |
Defined in Cardano.Api.Eras | |
A type used as a tag to distinguish the Alonzo era.
Instances
| HasTypeProxy AlonzoEra Source # | |
| IsShelleyBasedEra AlonzoEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra AlonzoEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| data AsType AlonzoEra Source # | |
Defined in Cardano.Api.Eras | |
data CardanoEra era where Source #
This GADT provides a value-level representation of all the Cardano eras. This enables pattern matching on the era to allow them to be treated in a non-uniform way.
This can be used in combination with the IsCardanoEra class to get access
to this value.
In combination this can often enable code that handles all eras, and does so uniformly where possible, and non-uniformly where necessary.
Constructors
| ByronEra ∷ CardanoEra ByronEra | |
| ShelleyEra ∷ CardanoEra ShelleyEra | |
| AllegraEra ∷ CardanoEra AllegraEra | |
| MaryEra ∷ CardanoEra MaryEra | |
| AlonzoEra ∷ CardanoEra AlonzoEra |
Instances
class HasTypeProxy era ⇒ IsCardanoEra era where Source #
The class of Cardano eras. This allows uniform handling of all Cardano
eras, but also non-uniform by making case distinctions on the CardanoEra
constructors, or the CardanoEraStyle constructors via cardanoEraStyle.
Methods
cardanoEra ∷ CardanoEra era Source #
Instances
| IsCardanoEra AlonzoEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra MaryEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra AllegraEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra ByronEra Source # | |
Defined in Cardano.Api.Eras Methods | |
data AnyCardanoEra where Source #
Constructors
| AnyCardanoEra ∷ IsCardanoEra era ⇒ CardanoEra era → AnyCardanoEra |
Instances
| Eq AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras | |
| Show AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras Methods showsPrec ∷ Int → AnyCardanoEra → ShowS # show ∷ AnyCardanoEra → String # showList ∷ [AnyCardanoEra] → ShowS # | |
| ToJSON AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras Methods toJSON ∷ AnyCardanoEra → Value # toEncoding ∷ AnyCardanoEra → Encoding # toJSONList ∷ [AnyCardanoEra] → Value # toEncodingList ∷ [AnyCardanoEra] → Encoding # | |
anyCardanoEra ∷ CardanoEra era → AnyCardanoEra Source #
Like the AnyCardanoEra constructor but does not demand a IsCardanoEra
class constraint.
data InAnyCardanoEra thing where Source #
This pairs up some era-dependent type with a CardanoEra value that tells
us what era it is, but hides the era type. This is useful when the era is
not statically known, for example when deserialising from a file.
Constructors
| InAnyCardanoEra ∷ IsCardanoEra era ⇒ CardanoEra era → thing era → InAnyCardanoEra thing |
Shelley-based eras
data ShelleyBasedEra era where Source #
While the Byron and Shelley eras are quite different, there are several eras that are based on Shelley with only minor differences. It is useful to be able to treat the Shelley-based eras in a mostly-uniform way.
Values of this type witness the fact that the era is Shelley-based. This can be used to constrain the era to being a Shelley-based on. It allows non-uniform handling making case distinctions on the constructor.
Constructors
| ShelleyBasedEraShelley ∷ ShelleyBasedEra ShelleyEra | |
| ShelleyBasedEraAllegra ∷ ShelleyBasedEra AllegraEra | |
| ShelleyBasedEraMary ∷ ShelleyBasedEra MaryEra | |
| ShelleyBasedEraAlonzo ∷ ShelleyBasedEra AlonzoEra |
Instances
| Eq (ShelleyBasedEra era) Source # | |
Defined in Cardano.Api.Eras Methods (==) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool # (/=) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool # | |
| Ord (ShelleyBasedEra era) Source # | |
Defined in Cardano.Api.Eras Methods compare ∷ ShelleyBasedEra era → ShelleyBasedEra era → Ordering # (<) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool # (<=) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool # (>) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool # (>=) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool # max ∷ ShelleyBasedEra era → ShelleyBasedEra era → ShelleyBasedEra era # min ∷ ShelleyBasedEra era → ShelleyBasedEra era → ShelleyBasedEra era # | |
| Show (ShelleyBasedEra era) Source # | |
Defined in Cardano.Api.Eras Methods showsPrec ∷ Int → ShelleyBasedEra era → ShowS # show ∷ ShelleyBasedEra era → String # showList ∷ [ShelleyBasedEra era] → ShowS # | |
class (IsCardanoEra era, Crypto (ShelleyLedgerEra era) ~ StandardCrypto) ⇒ IsShelleyBasedEra era where Source #
The class of eras that are based on Shelley. This allows uniform handling
of Shelley-based eras, but also non-uniform by making case distinctions on
the ShelleyBasedEra constructors.
Methods
Instances
| IsShelleyBasedEra AlonzoEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsShelleyBasedEra MaryEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsShelleyBasedEra AllegraEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsShelleyBasedEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras Methods | |
data InAnyShelleyBasedEra thing where Source #
This pairs up some era-dependent type with a ShelleyBasedEra value that
tells us what era it is, but hides the era type. This is useful when the era
is not statically known, for example when deserialising from a file.
Constructors
| InAnyShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ ShelleyBasedEra era → thing era → InAnyShelleyBasedEra thing |
data CardanoEraStyle era where Source #
This is the same essential information as CardanoEra but instead of a
flat set of alternative eras, it is factored into the legcy Byron era and
the current Shelley-based eras.
This way of factoring the eras is useful because in many cases the major differences are between the Byron and Shelley-based eras, and the Shelley-based eras can often be treated uniformly.
Constructors
| LegacyByronEra ∷ CardanoEraStyle ByronEra | |
| ShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ ShelleyBasedEra era → CardanoEraStyle era |
Instances
| Eq (CardanoEraStyle era) Source # | |
Defined in Cardano.Api.Eras Methods (==) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool # (/=) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool # | |
| Ord (CardanoEraStyle era) Source # | |
Defined in Cardano.Api.Eras Methods compare ∷ CardanoEraStyle era → CardanoEraStyle era → Ordering # (<) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool # (<=) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool # (>) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool # (>=) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool # max ∷ CardanoEraStyle era → CardanoEraStyle era → CardanoEraStyle era # min ∷ CardanoEraStyle era → CardanoEraStyle era → CardanoEraStyle era # | |
| Show (CardanoEraStyle era) Source # | |
Defined in Cardano.Api.Eras Methods showsPrec ∷ Int → CardanoEraStyle era → ShowS # show ∷ CardanoEraStyle era → String # showList ∷ [CardanoEraStyle era] → ShowS # | |
cardanoEraStyle ∷ CardanoEra era → CardanoEraStyle era Source #
The CardanoEraStyle for a CardanoEra.
Deprecated
type Shelley = ShelleyEra Source #
Deprecated: Use ShelleyEra or ShelleyAddr as appropriate
type Allegra = AllegraEra Source #
Deprecated: Use AllegraEra instead
Type tags
class HasTypeProxy t where Source #
Associated Types
A family of singleton types used in this API to indicate which type to use where it would otherwise be ambiguous or merely unclear.
Values of this type are passed to deserialisation functions for example.
Methods
proxyToAsType ∷ Proxy t → AsType t Source #
Instances
Cryptographic key interface
class (Eq (VerificationKey keyrole), Show (VerificationKey keyrole), SerialiseAsRawBytes (Hash keyrole), HasTextEnvelope (VerificationKey keyrole), HasTextEnvelope (SigningKey keyrole)) ⇒ Key keyrole Source #
An interface for cryptographic keys used for signatures with a SigningKey
and a VerificationKey key.
This interface does not provide actual signing or verifying functions since this API is concerned with the management of keys: generating and serialising.
Minimal complete definition
getVerificationKey, deterministicSigningKey, deterministicSigningKeySeedSize, verificationKeyHash
Instances
data family VerificationKey keyrole ∷ Type Source #
The type of cryptographic verification key, for each key role.
Instances
getVerificationKey ∷ Key keyrole ⇒ SigningKey keyrole → VerificationKey keyrole Source #
Get the corresponding verification key from a signing key.
verificationKeyHash ∷ Key keyrole ⇒ VerificationKey keyrole → Hash keyrole Source #
castVerificationKey ∷ CastVerificationKeyRole keyroleA keyroleB ⇒ VerificationKey keyroleA → VerificationKey keyroleB Source #
Change the role of a VerificationKey, if the representation permits.
castSigningKey ∷ CastSigningKeyRole keyroleA keyroleB ⇒ SigningKey keyroleA → SigningKey keyroleB Source #
Change the role of a SigningKey, if the representation permits.
Generating keys
generateSigningKey ∷ Key keyrole ⇒ AsType keyrole → IO (SigningKey keyrole) Source #
Generate a SigningKey using a seed from operating system entropy.
deterministicSigningKey ∷ Key keyrole ⇒ AsType keyrole → Seed → SigningKey keyrole Source #
Generate a SigningKey deterministically, given a Seed. The
required size of the seed is given by deterministicSigningKeySeedSize.
Hashes
In Cardano most keys are identified by their hash, and hashes are used in many other places.
data family Hash keyrole ∷ Type Source #
Instances
Payment addresses
Constructing and inspecting normal payment addresses
data Address addrtype Source #
Addresses are used as locations where assets live. The address determines the rights needed to spend assets at the address: in particular holding some signing key or being able to satisfy the conditions of a script.
There are currently two types of address:
- Byron addresses, which use the type tag
ByronAddr; and - Shelley addresses, which use the type tag
ShelleyAddr. Notably, Shelley addresses support scripts and stake delegation.
The address type is subtly from the ledger era in which each
address type is valid: while Byron addresses are the only choice in the
Byron era, the Shelley era and all subsequent eras support both Byron and
Shelley addresses. The Address type param only says the type of the address
(either Byron or Shelley). The AddressInEra type connects the address type
with the era in which it is supported.
Instances
A type used as a tag to distinguish Byron addresses.
Instances
| HasTypeProxy ByronAddr Source # | |
| SerialiseAsRawBytes (Address ByronAddr) Source # | |
Defined in Cardano.Api.Address Methods serialiseToRawBytes ∷ Address ByronAddr → ByteString Source # deserialiseFromRawBytes ∷ AsType (Address ByronAddr) → ByteString → Maybe (Address ByronAddr) Source # | |
| SerialiseAddress (Address ByronAddr) Source # | |
| data AsType ByronAddr Source # | |
Defined in Cardano.Api.Address | |
data ShelleyAddr Source #
A type used as a tag to distinguish Shelley addresses.
Instances
| HasTypeProxy ShelleyAddr Source # | |
Defined in Cardano.Api.Address Associated Types data AsType ShelleyAddr Source # Methods proxyToAsType ∷ Proxy ShelleyAddr → AsType ShelleyAddr Source # | |
| SerialiseAsRawBytes (Address ShelleyAddr) Source # | |
Defined in Cardano.Api.Address | |
| SerialiseAsBech32 (Address ShelleyAddr) Source # | |
Defined in Cardano.Api.Address Methods bech32PrefixFor ∷ Address ShelleyAddr → Text Source # bech32PrefixesPermitted ∷ AsType (Address ShelleyAddr) → [Text] Source # | |
| SerialiseAddress (Address ShelleyAddr) Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ Address ShelleyAddr → Text Source # deserialiseAddress ∷ AsType (Address ShelleyAddr) → Text → Maybe (Address ShelleyAddr) Source # | |
| data AsType ShelleyAddr Source # | |
Defined in Cardano.Api.Address | |
Constructors
| Mainnet | |
| Testnet !NetworkMagic |
Instances
Byron addresses
Byron-era payment keys. Used for Byron addresses and witnessing transactions that spend from these addresses.
These use Ed25519 but with a 32byte "chaincode" used in HD derivation.
The inclusion of the chaincode is a design mistake but one that cannot
be corrected for the Byron era. The Shelley era PaymentKeys do not include
a chaincode. It is safe to use a zero or random chaincode for new Byron keys.
This is a type level tag, used with other interfaces like Key.
Instances
data ByronKeyLegacy Source #
Instances
Shelley addresses
makeShelleyAddress ∷ NetworkId → PaymentCredential → StakeAddressReference → Address ShelleyAddr Source #
data PaymentCredential Source #
Constructors
| PaymentCredentialByKey (Hash PaymentKey) | |
| PaymentCredentialByScript ScriptHash |
Instances
| Eq PaymentCredential Source # | |
Defined in Cardano.Api.Address Methods | |
| Ord PaymentCredential Source # | |
Defined in Cardano.Api.Address Methods compare ∷ PaymentCredential → PaymentCredential → Ordering # (<) ∷ PaymentCredential → PaymentCredential → Bool # (<=) ∷ PaymentCredential → PaymentCredential → Bool # (>) ∷ PaymentCredential → PaymentCredential → Bool # (>=) ∷ PaymentCredential → PaymentCredential → Bool # max ∷ PaymentCredential → PaymentCredential → PaymentCredential # min ∷ PaymentCredential → PaymentCredential → PaymentCredential # | |
| Show PaymentCredential Source # | |
Defined in Cardano.Api.Address Methods showsPrec ∷ Int → PaymentCredential → ShowS # show ∷ PaymentCredential → String # showList ∷ [PaymentCredential] → ShowS # | |
newtype StakeAddressPointer Source #
Constructors
| StakeAddressPointer | |
Fields
| |
Instances
| Eq StakeAddressPointer Source # | |
Defined in Cardano.Api.Address Methods | |
| Show StakeAddressPointer Source # | |
Defined in Cardano.Api.Address Methods showsPrec ∷ Int → StakeAddressPointer → ShowS # show ∷ StakeAddressPointer → String # showList ∷ [StakeAddressPointer] → ShowS # | |
data StakeAddressReference Source #
Constructors
| StakeAddressByValue StakeCredential | |
| StakeAddressByPointer StakeAddressPointer | |
| NoStakeAddress |
Instances
| Eq StakeAddressReference Source # | |
Defined in Cardano.Api.Address Methods (==) ∷ StakeAddressReference → StakeAddressReference → Bool # (/=) ∷ StakeAddressReference → StakeAddressReference → Bool # | |
| Show StakeAddressReference Source # | |
Defined in Cardano.Api.Address Methods showsPrec ∷ Int → StakeAddressReference → ShowS # show ∷ StakeAddressReference → String # showList ∷ [StakeAddressReference] → ShowS # | |
data PaymentKey Source #
Shelley-era payment keys. Used for Shelley payment addresses and witnessing transactions that spend from these addresses.
This is a type level tag, used with other interfaces like Key.
Instances
data PaymentExtendedKey Source #
Shelley-era payment keys using extended ed25519 cryptographic keys.
They can be used for Shelley payment addresses and witnessing transactions that spend from these addresses.
These extended keys are used by HD wallets. So this type provides interoperability with HD wallets. The ITN CLI also supported this key type.
The extended verification keys can be converted (via castVerificationKey)
to ordinary keys (i.e. VerificationKey PaymentKey) but this is not the
case for the signing keys. The signing keys can be used to witness
transactions directly, with verification via their non-extended verification
key (VerificationKey PaymentKey).
This is a type level tag, used with other interfaces like Key.
Instances
Addresses in any era
data AddressAny Source #
Either a Byron address or a Shelley address.
Sometimes we need to be able to work with either of the two types of address (Byron or Shelley addresses), but without reference to an era in which the address will be used. This type serves that purpose.
Constructors
| AddressByron !(Address ByronAddr) | |
| AddressShelley !(Address ShelleyAddr) |
Instances
Addresses in specific eras
data AddressInEra era where Source #
An Address that can be used in a particular ledger era.
All current ledger eras support Byron addresses. Shelley addresses are
supported in the ShelleyEra and later eras.
Constructors
| AddressInEra ∷ AddressTypeInEra addrtype era → Address addrtype → AddressInEra era |
Instances
data AddressTypeInEra addrtype era where Source #
Constructors
| ByronAddressInAnyEra ∷ AddressTypeInEra ByronAddr era | |
| ShelleyAddressInEra ∷ ShelleyBasedEra era → AddressTypeInEra ShelleyAddr era |
Instances
| Show (AddressTypeInEra addrtype era) Source # | |
Defined in Cardano.Api.Address Methods showsPrec ∷ Int → AddressTypeInEra addrtype era → ShowS # show ∷ AddressTypeInEra addrtype era → String # showList ∷ [AddressTypeInEra addrtype era] → ShowS # | |
byronAddressInEra ∷ Address ByronAddr → AddressInEra era Source #
shelleyAddressInEra ∷ IsShelleyBasedEra era ⇒ Address ShelleyAddr → AddressInEra era Source #
anyAddressInShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ AddressAny → AddressInEra era Source #
anyAddressInEra ∷ CardanoEra era → AddressAny → Maybe (AddressInEra era) Source #
toAddressAny ∷ Address addr → AddressAny Source #
makeShelleyAddressInEra ∷ IsShelleyBasedEra era ⇒ NetworkId → PaymentCredential → StakeAddressReference → AddressInEra era Source #
Stake addresses
Constructing and inspecting stake addresses
data StakeAddress Source #
Instances
data StakeCredential Source #
Instances
| Eq StakeCredential Source # | |
Defined in Cardano.Api.Address Methods (==) ∷ StakeCredential → StakeCredential → Bool # (/=) ∷ StakeCredential → StakeCredential → Bool # | |
| Ord StakeCredential Source # | |
Defined in Cardano.Api.Address Methods compare ∷ StakeCredential → StakeCredential → Ordering # (<) ∷ StakeCredential → StakeCredential → Bool # (<=) ∷ StakeCredential → StakeCredential → Bool # (>) ∷ StakeCredential → StakeCredential → Bool # (>=) ∷ StakeCredential → StakeCredential → Bool # | |
| Show StakeCredential Source # | |
Defined in Cardano.Api.Address Methods showsPrec ∷ Int → StakeCredential → ShowS # show ∷ StakeCredential → String # showList ∷ [StakeCredential] → ShowS # | |
Instances
data StakeExtendedKey Source #
Shelley-era stake keys using extended ed25519 cryptographic keys.
They can be used for Shelley stake addresses and witnessing transactions that use stake addresses.
These extended keys are used by HD wallets. So this type provides interoperability with HD wallets. The ITN CLI also supported this key type.
The extended verification keys can be converted (via castVerificationKey)
to ordinary keys (i.e. VerificationKey StakeKey) but this is not the
case for the signing keys. The signing keys can be used to witness
transactions directly, with verification via their non-extended verification
key (VerificationKey StakeKey).
This is a type level tag, used with other interfaces like Key.
Instances
Currency values
Ada / Lovelace
Instances
| Enum Lovelace Source # | |
| Eq Lovelace Source # | |
| Num Lovelace Source # | |
| Ord Lovelace Source # | |
| Show Lovelace Source # | |
| Semigroup Lovelace Source # | |
| Monoid Lovelace Source # | |
| FromJSON Lovelace Source # | |
Defined in Cardano.Api.Value | |
| ToJSON Lovelace Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Lovelace → Encoding # toJSONList ∷ [Lovelace] → Value # toEncodingList ∷ [Lovelace] → Encoding # | |
| FromCBOR Lovelace Source # | |
| ToCBOR Lovelace Source # | |
Multi-asset values
Instances
| Eq Quantity Source # | |
| Num Quantity Source # | |
| Ord Quantity Source # | |
| Show Quantity Source # | |
| Semigroup Quantity Source # | |
| Monoid Quantity Source # | |
| FromJSON Quantity Source # | |
Defined in Cardano.Api.Value | |
| ToJSON Quantity Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Quantity → Encoding # toJSONList ∷ [Quantity] → Value # toEncodingList ∷ [Quantity] → Encoding # | |
Constructors
| PolicyId ScriptHash |
Instances
| Eq PolicyId Source # | |
| Ord PolicyId Source # | |
| Show PolicyId Source # | |
| IsString PolicyId Source # | |
Defined in Cardano.Api.Value Methods fromString ∷ String → PolicyId # | |
| FromJSON PolicyId Source # | |
Defined in Cardano.Api.Value | |
| ToJSON PolicyId Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ PolicyId → Encoding # toJSONList ∷ [PolicyId] → Value # toEncodingList ∷ [PolicyId] → Encoding # | |
| HasTypeProxy PolicyId Source # | |
| SerialiseAsRawBytes PolicyId Source # | |
Defined in Cardano.Api.Value Methods serialiseToRawBytes ∷ PolicyId → ByteString Source # deserialiseFromRawBytes ∷ AsType PolicyId → ByteString → Maybe PolicyId Source # | |
| data AsType PolicyId Source # | |
Defined in Cardano.Api.Value | |
scriptPolicyId ∷ Script lang → PolicyId Source #
Constructors
| AssetName ByteString |
Instances
| Eq AssetName Source # | |
| Ord AssetName Source # | |
Defined in Cardano.Api.Value | |
| Show AssetName Source # | |
| IsString AssetName Source # | |
Defined in Cardano.Api.Value Methods fromString ∷ String → AssetName # | |
| FromJSON AssetName Source # | |
Defined in Cardano.Api.Value | |
| ToJSON AssetName Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ AssetName → Encoding # toJSONList ∷ [AssetName] → Value # toEncodingList ∷ [AssetName] → Encoding # | |
| FromJSONKey AssetName Source # | |
Defined in Cardano.Api.Value | |
| ToJSONKey AssetName Source # | |
Defined in Cardano.Api.Value | |
| HasTypeProxy AssetName Source # | |
| SerialiseAsRawBytes AssetName Source # | |
Defined in Cardano.Api.Value | |
| data AsType AssetName Source # | |
Defined in Cardano.Api.Value | |
Constructors
| AdaAssetId | |
| AssetId !PolicyId !AssetName |
Instances
negateValue ∷ Value → Value Source #
This lets you write a - b as a <> negateValue b.
newtype ValueNestedRep Source #
Constructors
| ValueNestedRep [ValueNestedBundle] |
Instances
| Eq ValueNestedRep Source # | |
Defined in Cardano.Api.Value Methods (==) ∷ ValueNestedRep → ValueNestedRep → Bool # (/=) ∷ ValueNestedRep → ValueNestedRep → Bool # | |
| Ord ValueNestedRep Source # | |
Defined in Cardano.Api.Value Methods compare ∷ ValueNestedRep → ValueNestedRep → Ordering # (<) ∷ ValueNestedRep → ValueNestedRep → Bool # (<=) ∷ ValueNestedRep → ValueNestedRep → Bool # (>) ∷ ValueNestedRep → ValueNestedRep → Bool # (>=) ∷ ValueNestedRep → ValueNestedRep → Bool # | |
| Show ValueNestedRep Source # | |
Defined in Cardano.Api.Value Methods showsPrec ∷ Int → ValueNestedRep → ShowS # show ∷ ValueNestedRep → String # showList ∷ [ValueNestedRep] → ShowS # | |
| FromJSON ValueNestedRep Source # | |
Defined in Cardano.Api.Value | |
| ToJSON ValueNestedRep Source # | |
Defined in Cardano.Api.Value Methods toJSON ∷ ValueNestedRep → Value # toEncoding ∷ ValueNestedRep → Encoding # toJSONList ∷ [ValueNestedRep] → Value # toEncodingList ∷ [ValueNestedRep] → Encoding # | |
data ValueNestedBundle Source #
A bundle within a ValueNestedRep for a single PolicyId, or for the
special case of ada.
Constructors
| ValueNestedBundleAda Quantity | |
| ValueNestedBundle PolicyId (Map AssetName Quantity) |
Instances
| Eq ValueNestedBundle Source # | |
Defined in Cardano.Api.Value Methods | |
| Ord ValueNestedBundle Source # | |
Defined in Cardano.Api.Value Methods compare ∷ ValueNestedBundle → ValueNestedBundle → Ordering # (<) ∷ ValueNestedBundle → ValueNestedBundle → Bool # (<=) ∷ ValueNestedBundle → ValueNestedBundle → Bool # (>) ∷ ValueNestedBundle → ValueNestedBundle → Bool # (>=) ∷ ValueNestedBundle → ValueNestedBundle → Bool # max ∷ ValueNestedBundle → ValueNestedBundle → ValueNestedBundle # min ∷ ValueNestedBundle → ValueNestedBundle → ValueNestedBundle # | |
| Show ValueNestedBundle Source # | |
Defined in Cardano.Api.Value Methods showsPrec ∷ Int → ValueNestedBundle → ShowS # show ∷ ValueNestedBundle → String # showList ∷ [ValueNestedBundle] → ShowS # | |
Ada / Lovelace within multi-asset values
valueToLovelace ∷ Value → Maybe Lovelace Source #
Check if the Value consists of only Lovelace and no other assets,
and if so then return the Lovelace.
See also selectLovelace to select the Lovelace quantity from the Value,
ignoring other assets.
Blocks
Blocks in the context of an era
A blockchain block in a particular Cardano era.
Bundled Patterns
| pattern Block ∷ BlockHeader → [Tx era] → Block era | A block consists of a header and a body containing transactions. |
data BlockHeader Source #
Constructors
| BlockHeader !SlotNo !(Hash BlockHeader) !BlockNo |
Instances
Points on the chain
data ChainPoint Source #
Constructors
| ChainPointAtGenesis | |
| ChainPoint !SlotNo !(Hash BlockHeader) |
Instances
| Eq ChainPoint Source # | |
Defined in Cardano.Api.Block | |
| Show ChainPoint Source # | |
Defined in Cardano.Api.Block Methods showsPrec ∷ Int → ChainPoint → ShowS # show ∷ ChainPoint → String # showList ∷ [ChainPoint] → ShowS # | |
Instances
| Enum EpochNo | |
Defined in Cardano.Slotting.Slot | |
| Eq EpochNo | |
| Num EpochNo | |
| Ord EpochNo | |
| Show EpochNo | |
| Generic EpochNo | |
| FromJSON EpochNo | |
Defined in Cardano.Slotting.Slot | |
| NoThunks EpochNo | |
| ToJSON EpochNo | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ EpochNo → Encoding # toJSONList ∷ [EpochNo] → Value # toEncodingList ∷ [EpochNo] → Encoding # | |
| FromCBOR EpochNo | |
| ToCBOR EpochNo | |
| Serialise EpochNo | |
Defined in Cardano.Slotting.Slot | |
| Condense EpochNo | |
Defined in Ouroboros.Consensus.Util.Condense | |
| type Rep EpochNo | |
Defined in Cardano.Slotting.Slot type Rep EpochNo = D1 ('MetaData "EpochNo" "Cardano.Slotting.Slot" "cardano-slotting-0.1.0.0-74adb84e94ce7d7d929bce32b4990d7b16792c13a0fe2771677cf567ba68fab0" 'True) (C1 ('MetaCons "EpochNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |
Tip of the chain
This is like a ChainPoint but is conventionally used for the tip of the
chain: that is the most recent block at the end of the chain.
It also carries the BlockNo of the chain tip.
Constructors
| ChainTipAtGenesis | |
| ChainTip !SlotNo !(Hash BlockHeader) !BlockNo |
Instances
| Bounded BlockNo | |
| Enum BlockNo | |
Defined in Cardano.Slotting.Block | |
| Eq BlockNo | |
| Num BlockNo | |
| Ord BlockNo | |
| Show BlockNo | |
| Generic BlockNo | |
| NoThunks BlockNo | |
| FromCBOR BlockNo | |
| ToCBOR BlockNo | |
| Serialise BlockNo | |
Defined in Cardano.Slotting.Block | |
| Condense BlockNo | |
Defined in Ouroboros.Consensus.Util.Condense | |
| type Rep BlockNo | |
Defined in Cardano.Slotting.Block type Rep BlockNo = D1 ('MetaData "BlockNo" "Cardano.Slotting.Block" "cardano-slotting-0.1.0.0-74adb84e94ce7d7d929bce32b4990d7b16792c13a0fe2771677cf567ba68fab0" 'True) (C1 ('MetaCons "BlockNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBlockNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |
Building transactions
Building transactions
Constructing and inspecting transactions
Transaction bodies
data TxBody era where Source #
Bundled Patterns
| pattern TxBody ∷ TxBodyContent ViewTx era → TxBody era |
Instances
| Eq (TxBody era) Source # | |
| Show (TxBody era) Source # | |
| HasTypeProxy era ⇒ HasTypeProxy (TxBody era) Source # | |
| IsCardanoEra era ⇒ SerialiseAsCBOR (TxBody era) Source # | |
Defined in Cardano.Api.TxBody Methods serialiseToCBOR ∷ TxBody era → ByteString Source # deserialiseFromCBOR ∷ AsType (TxBody era) → ByteString → Either DecoderError (TxBody era) Source # | |
| IsCardanoEra era ⇒ HasTextEnvelope (TxBody era) Source # | |
Defined in Cardano.Api.TxBody Methods textEnvelopeType ∷ AsType (TxBody era) → TextEnvelopeType Source # textEnvelopeDefaultDescr ∷ TxBody era → TextEnvelopeDescr Source # | |
| data AsType (TxBody era) Source # | |
Defined in Cardano.Api.TxBody | |
makeTransactionBody ∷ ∀ era. IsCardanoEra era ⇒ TxBodyContent BuildTx era → Either (TxBodyError era) (TxBody era) Source #
data TxBodyContent build era Source #
Constructors
| TxBodyContent | |
Fields
| |
data TxBodyError era Source #
Constructors
Instances
| Show (TxBodyError era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxBodyError era → ShowS # show ∷ TxBodyError era → String # showList ∷ [TxBodyError era] → ShowS # | |
| Error (TxBodyError era) Source # | |
Defined in Cardano.Api.TxBody Methods displayError ∷ TxBodyError era → String Source # | |
Transaction Ids
Constructors
| TxId (Hash StandardCrypto EraIndependentTxBody) |
Instances
| Eq TxId Source # | |
| Ord TxId Source # | |
| Show TxId Source # | |
| IsString TxId Source # | |
Defined in Cardano.Api.TxBody Methods fromString ∷ String → TxId # | |
| FromJSON TxId Source # | |
Defined in Cardano.Api.TxBody | |
| ToJSON TxId Source # | |
Defined in Cardano.Api.TxBody Methods toEncoding ∷ TxId → Encoding # toJSONList ∷ [TxId] → Value # toEncodingList ∷ [TxId] → Encoding # | |
| FromJSONKey TxId Source # | |
Defined in Cardano.Api.TxBody | |
| ToJSONKey TxId Source # | |
Defined in Cardano.Api.TxBody | |
| HasTypeProxy TxId Source # | |
| SerialiseAsRawBytes TxId Source # | |
Defined in Cardano.Api.TxBody Methods serialiseToRawBytes ∷ TxId → ByteString Source # deserialiseFromRawBytes ∷ AsType TxId → ByteString → Maybe TxId Source # | |
| data AsType TxId Source # | |
Defined in Cardano.Api.TxBody | |
Transaction inputs
Transaction outputs
Constructors
| TxOut (AddressInEra era) (TxOutValue era) (TxOutDatumHash era) |
Instances
| Eq (TxOut era) Source # | |
| Show (TxOut era) Source # | |
| Generic (TxOut era) Source # | |
| IsCardanoEra era ⇒ ToJSON (TxOut era) Source # | |
Defined in Cardano.Api.TxBody Methods toEncoding ∷ TxOut era → Encoding # toJSONList ∷ [TxOut era] → Value # toEncodingList ∷ [TxOut era] → Encoding # | |
| type Rep (TxOut era) Source # | |
Defined in Cardano.Api.TxBody type Rep (TxOut era) = D1 ('MetaData "TxOut" "Cardano.Api.TxBody" "cardano-api-1.27.0-inplace" 'False) (C1 ('MetaCons "TxOut" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (AddressInEra era)) :*: (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TxOutValue era)) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TxOutDatumHash era))))) | |
data TxOutValue era where Source #
Constructors
| TxOutAdaOnly ∷ OnlyAdaSupportedInEra era → Lovelace → TxOutValue era | |
| TxOutValue ∷ MultiAssetSupportedInEra era → Value → TxOutValue era |
Instances
serialiseAddressForTxOut ∷ AddressInEra era → Text Source #
data TxOutDatumHash era where Source #
Constructors
| TxOutDatumHashNone ∷ TxOutDatumHash era | |
| TxOutDatumHash ∷ ScriptDataSupportedInEra era → Hash ScriptData → TxOutDatumHash era |
Instances
Other transaction body types
data TxInsCollateral era where Source #
Constructors
| TxInsCollateralNone ∷ TxInsCollateral era | |
| TxInsCollateral ∷ CollateralSupportedInEra era → [TxIn] → TxInsCollateral era |
Instances
| Eq (TxInsCollateral era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxInsCollateral era → TxInsCollateral era → Bool # (/=) ∷ TxInsCollateral era → TxInsCollateral era → Bool # | |
| Show (TxInsCollateral era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxInsCollateral era → ShowS # show ∷ TxInsCollateral era → String # showList ∷ [TxInsCollateral era] → ShowS # | |
Constructors
| TxFeeImplicit ∷ TxFeesImplicitInEra era → TxFee era | |
| TxFeeExplicit ∷ TxFeesExplicitInEra era → Lovelace → TxFee era |
Instances
data TxValidityLowerBound era where Source #
Constructors
| TxValidityNoLowerBound ∷ TxValidityLowerBound era | |
| TxValidityLowerBound ∷ ValidityLowerBoundSupportedInEra era → SlotNo → TxValidityLowerBound era |
Instances
| Eq (TxValidityLowerBound era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxValidityLowerBound era → TxValidityLowerBound era → Bool # (/=) ∷ TxValidityLowerBound era → TxValidityLowerBound era → Bool # | |
| Show (TxValidityLowerBound era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxValidityLowerBound era → ShowS # show ∷ TxValidityLowerBound era → String # showList ∷ [TxValidityLowerBound era] → ShowS # | |
data TxValidityUpperBound era where Source #
This was formerly known as the TTL.
Constructors
| TxValidityNoUpperBound ∷ ValidityNoUpperBoundSupportedInEra era → TxValidityUpperBound era | |
| TxValidityUpperBound ∷ ValidityUpperBoundSupportedInEra era → SlotNo → TxValidityUpperBound era |
Instances
| Eq (TxValidityUpperBound era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxValidityUpperBound era → TxValidityUpperBound era → Bool # (/=) ∷ TxValidityUpperBound era → TxValidityUpperBound era → Bool # | |
| Show (TxValidityUpperBound era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxValidityUpperBound era → ShowS # show ∷ TxValidityUpperBound era → String # showList ∷ [TxValidityUpperBound era] → ShowS # | |
Instances
| Bounded SlotNo | |
| Enum SlotNo | |
Defined in Cardano.Slotting.Slot | |
| Eq SlotNo | |
| Num SlotNo | |
| Ord SlotNo | |
| Show SlotNo | |
| Generic SlotNo | |
| NFData SlotNo | |
Defined in Cardano.Slotting.Slot | |
| FromJSON SlotNo | |
Defined in Cardano.Slotting.Slot | |
| NoThunks SlotNo | |
| ToJSON SlotNo | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ SlotNo → Encoding # toJSONList ∷ [SlotNo] → Value # toEncodingList ∷ [SlotNo] → Encoding # | |
| FromCBOR SlotNo | |
| ToCBOR SlotNo | |
| Serialise SlotNo | |
Defined in Cardano.Slotting.Slot | |
| Condense SlotNo | |
Defined in Ouroboros.Consensus.Util.Condense | |
| HasField "ttl" (TxBody era) SlotNo | |
Defined in Shelley.Spec.Ledger.TxBody | |
| HasHeader block ⇒ Anchorable (WithOrigin SlotNo) (Anchor block) block | |
Defined in Ouroboros.Network.AnchoredFragment Methods asAnchor ∷ block → Anchor block getAnchorMeasure ∷ Proxy block → Anchor block → WithOrigin SlotNo | |
| Anchorable (WithOrigin SlotNo) (HeaderState blk) (HeaderState blk) | |
Defined in Ouroboros.Consensus.HeaderValidation Methods asAnchor ∷ HeaderState blk → HeaderState blk getAnchorMeasure ∷ Proxy (HeaderState blk) → HeaderState blk → WithOrigin SlotNo | |
| GetTip l ⇒ Anchorable (WithOrigin SlotNo) (Checkpoint l) (Checkpoint l) | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.InMemory Methods asAnchor ∷ Checkpoint l → Checkpoint l getAnchorMeasure ∷ Proxy (Checkpoint l) → Checkpoint l → WithOrigin SlotNo | |
| Embed (StakeCreds era) (Map (Credential 'Staking era) SlotNo) | |
| HasExp (StakeCreds era) (Map (Credential 'Staking era) SlotNo) | |
Defined in Shelley.Spec.Ledger.TxBody | |
| type Rep SlotNo | |
Defined in Cardano.Slotting.Slot type Rep SlotNo = D1 ('MetaData "SlotNo" "Cardano.Slotting.Slot" "cardano-slotting-0.1.0.0-74adb84e94ce7d7d929bce32b4990d7b16792c13a0fe2771677cf567ba68fab0" 'True) (C1 ('MetaCons "SlotNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSlotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |
newtype EpochSlots #
Constructors
| EpochSlots | |
Fields | |
Instances
data TxMetadataInEra era where Source #
Constructors
| TxMetadataNone ∷ TxMetadataInEra era | |
| TxMetadataInEra ∷ TxMetadataSupportedInEra era → TxMetadata → TxMetadataInEra era |
Instances
| Eq (TxMetadataInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxMetadataInEra era → TxMetadataInEra era → Bool # (/=) ∷ TxMetadataInEra era → TxMetadataInEra era → Bool # | |
| Show (TxMetadataInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxMetadataInEra era → ShowS # show ∷ TxMetadataInEra era → String # showList ∷ [TxMetadataInEra era] → ShowS # | |
data TxAuxScripts era where Source #
Constructors
| TxAuxScriptsNone ∷ TxAuxScripts era | |
| TxAuxScripts ∷ AuxScriptsSupportedInEra era → [ScriptInEra era] → TxAuxScripts era |
Instances
| Eq (TxAuxScripts era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxAuxScripts era → TxAuxScripts era → Bool # (/=) ∷ TxAuxScripts era → TxAuxScripts era → Bool # | |
| Show (TxAuxScripts era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxAuxScripts era → ShowS # show ∷ TxAuxScripts era → String # showList ∷ [TxAuxScripts era] → ShowS # | |
data TxExtraScriptData era where Source #
Constructors
| TxExtraScriptDataNone ∷ TxExtraScriptData era | |
| TxExtraScriptData ∷ ScriptDataSupportedInEra era → [ScriptData] → TxExtraScriptData era |
Instances
| Eq (TxExtraScriptData era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxExtraScriptData era → TxExtraScriptData era → Bool # (/=) ∷ TxExtraScriptData era → TxExtraScriptData era → Bool # | |
| Show (TxExtraScriptData era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxExtraScriptData era → ShowS # show ∷ TxExtraScriptData era → String # showList ∷ [TxExtraScriptData era] → ShowS # | |
data TxExtraKeyWitnesses era where Source #
Constructors
| TxExtraKeyWitnessesNone ∷ TxExtraKeyWitnesses era | |
| TxExtraKeyWitnesses ∷ TxExtraKeyWitnessesSupportedInEra era → [Hash PaymentKey] → TxExtraKeyWitnesses era |
Instances
| Eq (TxExtraKeyWitnesses era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxExtraKeyWitnesses era → TxExtraKeyWitnesses era → Bool # (/=) ∷ TxExtraKeyWitnesses era → TxExtraKeyWitnesses era → Bool # | |
| Show (TxExtraKeyWitnesses era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxExtraKeyWitnesses era → ShowS # show ∷ TxExtraKeyWitnesses era → String # showList ∷ [TxExtraKeyWitnesses era] → ShowS # | |
data TxWithdrawals build era where Source #
Constructors
| TxWithdrawalsNone ∷ TxWithdrawals build era | |
| TxWithdrawals ∷ WithdrawalsSupportedInEra era → [(StakeAddress, Lovelace, BuildTxWith build (Witness WitCtxStake era))] → TxWithdrawals build era |
Instances
| Eq (TxWithdrawals build era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxWithdrawals build era → TxWithdrawals build era → Bool # (/=) ∷ TxWithdrawals build era → TxWithdrawals build era → Bool # | |
| Show (TxWithdrawals build era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxWithdrawals build era → ShowS # show ∷ TxWithdrawals build era → String # showList ∷ [TxWithdrawals build era] → ShowS # | |
data TxCertificates build era where Source #
Constructors
| TxCertificatesNone ∷ TxCertificates build era | |
| TxCertificates ∷ CertificatesSupportedInEra era → [Certificate] → BuildTxWith build (Map StakeCredential (Witness WitCtxStake era)) → TxCertificates build era |
Instances
| Eq (TxCertificates build era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxCertificates build era → TxCertificates build era → Bool # (/=) ∷ TxCertificates build era → TxCertificates build era → Bool # | |
| Show (TxCertificates build era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxCertificates build era → ShowS # show ∷ TxCertificates build era → String # showList ∷ [TxCertificates build era] → ShowS # | |
data TxUpdateProposal era where Source #
Constructors
| TxUpdateProposalNone ∷ TxUpdateProposal era | |
| TxUpdateProposal ∷ UpdateProposalSupportedInEra era → UpdateProposal → TxUpdateProposal era |
Instances
| Eq (TxUpdateProposal era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxUpdateProposal era → TxUpdateProposal era → Bool # (/=) ∷ TxUpdateProposal era → TxUpdateProposal era → Bool # | |
| Show (TxUpdateProposal era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxUpdateProposal era → ShowS # show ∷ TxUpdateProposal era → String # showList ∷ [TxUpdateProposal era] → ShowS # | |
data TxMintValue build era where Source #
Constructors
| TxMintNone ∷ TxMintValue build era | |
| TxMintValue ∷ MultiAssetSupportedInEra era → Value → BuildTxWith build (Map PolicyId (ScriptWitness WitCtxMint era)) → TxMintValue build era |
Instances
| Eq (TxMintValue build era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxMintValue build era → TxMintValue build era → Bool # (/=) ∷ TxMintValue build era → TxMintValue build era → Bool # | |
| Show (TxMintValue build era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxMintValue build era → ShowS # show ∷ TxMintValue build era → String # showList ∷ [TxMintValue build era] → ShowS # | |
Building vs viewing transactions
data BuildTxWith build a where Source #
Constructors
| ViewTx ∷ BuildTxWith ViewTx a | |
| BuildTxWith ∷ a → BuildTxWith BuildTx a |
Instances
| Eq a ⇒ Eq (BuildTxWith build a) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ BuildTxWith build a → BuildTxWith build a → Bool # (/=) ∷ BuildTxWith build a → BuildTxWith build a → Bool # | |
| Show a ⇒ Show (BuildTxWith build a) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → BuildTxWith build a → ShowS # show ∷ BuildTxWith build a → String # showList ∷ [BuildTxWith build a] → ShowS # | |
Era-dependent transaction body features
data CollateralSupportedInEra era where Source #
A representation of whether the era supports transactions with inputs used only for collateral for script fees.
The Alonzo and subsequent eras support collateral inputs.
Constructors
| CollateralInAlonzoEra ∷ CollateralSupportedInEra AlonzoEra |
Instances
| Eq (CollateralSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ CollateralSupportedInEra era → CollateralSupportedInEra era → Bool # (/=) ∷ CollateralSupportedInEra era → CollateralSupportedInEra era → Bool # | |
| Show (CollateralSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → CollateralSupportedInEra era → ShowS # show ∷ CollateralSupportedInEra era → String # showList ∷ [CollateralSupportedInEra era] → ShowS # | |
data MultiAssetSupportedInEra era where Source #
A representation of whether the era supports multi-asset transactions.
The Mary and subsequent eras support multi-asset transactions.
The negation of this is OnlyAdaSupportedInEra.
Constructors
| MultiAssetInMaryEra ∷ MultiAssetSupportedInEra MaryEra | Multi-asset transactions are supported in the |
| MultiAssetInAlonzoEra ∷ MultiAssetSupportedInEra AlonzoEra | Multi-asset transactions are supported in the |
Instances
| Eq (MultiAssetSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ MultiAssetSupportedInEra era → MultiAssetSupportedInEra era → Bool # (/=) ∷ MultiAssetSupportedInEra era → MultiAssetSupportedInEra era → Bool # | |
| Show (MultiAssetSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → MultiAssetSupportedInEra era → ShowS # show ∷ MultiAssetSupportedInEra era → String # showList ∷ [MultiAssetSupportedInEra era] → ShowS # | |
| ToJSON (MultiAssetSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods toJSON ∷ MultiAssetSupportedInEra era → Value # toEncoding ∷ MultiAssetSupportedInEra era → Encoding # toJSONList ∷ [MultiAssetSupportedInEra era] → Value # toEncodingList ∷ [MultiAssetSupportedInEra era] → Encoding # | |
data OnlyAdaSupportedInEra era where Source #
A representation of whether the era supports only ada transactions.
Prior to the Mary era only ada transactions are supported. Multi-assets are supported from the Mary era onwards.
This is the negation of MultiAssetSupportedInEra. It exists since we need
evidence to be positive.
Constructors
| AdaOnlyInByronEra ∷ OnlyAdaSupportedInEra ByronEra | |
| AdaOnlyInShelleyEra ∷ OnlyAdaSupportedInEra ShelleyEra | |
| AdaOnlyInAllegraEra ∷ OnlyAdaSupportedInEra AllegraEra |
Instances
| Eq (OnlyAdaSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ OnlyAdaSupportedInEra era → OnlyAdaSupportedInEra era → Bool # (/=) ∷ OnlyAdaSupportedInEra era → OnlyAdaSupportedInEra era → Bool # | |
| Show (OnlyAdaSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → OnlyAdaSupportedInEra era → ShowS # show ∷ OnlyAdaSupportedInEra era → String # showList ∷ [OnlyAdaSupportedInEra era] → ShowS # | |
data TxFeesExplicitInEra era where Source #
A representation of whether the era requires explicitly specified fees in transactions.
The Byron era tx fees are implicit (as the difference bettween the sum of outputs and sum of inputs), but all later eras the fees are specified in the transaction explicitly.
Constructors
Instances
| Eq (TxFeesExplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxFeesExplicitInEra era → TxFeesExplicitInEra era → Bool # (/=) ∷ TxFeesExplicitInEra era → TxFeesExplicitInEra era → Bool # | |
| Show (TxFeesExplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxFeesExplicitInEra era → ShowS # show ∷ TxFeesExplicitInEra era → String # showList ∷ [TxFeesExplicitInEra era] → ShowS # | |
data TxFeesImplicitInEra era where Source #
A representation of whether the era requires implicitly specified fees in transactions.
This is the negation of TxFeesExplicitInEra.
Constructors
| TxFeesImplicitInByronEra ∷ TxFeesImplicitInEra ByronEra |
Instances
| Eq (TxFeesImplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxFeesImplicitInEra era → TxFeesImplicitInEra era → Bool # (/=) ∷ TxFeesImplicitInEra era → TxFeesImplicitInEra era → Bool # | |
| Show (TxFeesImplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxFeesImplicitInEra era → ShowS # show ∷ TxFeesImplicitInEra era → String # showList ∷ [TxFeesImplicitInEra era] → ShowS # | |
data ValidityUpperBoundSupportedInEra era where Source #
A representation of whether the era supports transactions with an upper bound on the range of slots in which they are valid.
The Shelley and subsequent eras support an upper bound on the validity range. In the Shelley era specifically it is actually required. It is optional in later eras.
Constructors
Instances
| Eq (ValidityUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ValidityUpperBoundSupportedInEra era → ValidityUpperBoundSupportedInEra era → Bool # (/=) ∷ ValidityUpperBoundSupportedInEra era → ValidityUpperBoundSupportedInEra era → Bool # | |
| Show (ValidityUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → ValidityUpperBoundSupportedInEra era → ShowS # show ∷ ValidityUpperBoundSupportedInEra era → String # showList ∷ [ValidityUpperBoundSupportedInEra era] → ShowS # | |
data ValidityNoUpperBoundSupportedInEra era where Source #
A representation of whether the era supports transactions having no upper bound on the range of slots in which they are valid.
Note that the ShelleyEra does not support omitting a validity upper
bound. It was introduced as a required field in Shelley and then made
optional in Allegra and subsequent eras.
The Byron era supports this by virtue of the fact that it does not support validity ranges at all.
Constructors
Instances
| Eq (ValidityNoUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ValidityNoUpperBoundSupportedInEra era → ValidityNoUpperBoundSupportedInEra era → Bool # (/=) ∷ ValidityNoUpperBoundSupportedInEra era → ValidityNoUpperBoundSupportedInEra era → Bool # | |
| Show (ValidityNoUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → ValidityNoUpperBoundSupportedInEra era → ShowS # show ∷ ValidityNoUpperBoundSupportedInEra era → String # showList ∷ [ValidityNoUpperBoundSupportedInEra era] → ShowS # | |
data ValidityLowerBoundSupportedInEra era where Source #
A representation of whether the era supports transactions with a lower bound on the range of slots in which they are valid.
The Allegra and subsequent eras support an optional lower bound on the
validity range. No equivalent of ValidityNoUpperBoundSupportedInEra is
needed since all eras support having no lower bound.
Constructors
Instances
| Eq (ValidityLowerBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ValidityLowerBoundSupportedInEra era → ValidityLowerBoundSupportedInEra era → Bool # (/=) ∷ ValidityLowerBoundSupportedInEra era → ValidityLowerBoundSupportedInEra era → Bool # | |
| Show (ValidityLowerBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → ValidityLowerBoundSupportedInEra era → ShowS # show ∷ ValidityLowerBoundSupportedInEra era → String # showList ∷ [ValidityLowerBoundSupportedInEra era] → ShowS # | |
data TxMetadataSupportedInEra era where Source #
A representation of whether the era supports transaction metadata.
Transaction metadata is supported from the Shelley era onwards.
Constructors
Instances
| Eq (TxMetadataSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxMetadataSupportedInEra era → TxMetadataSupportedInEra era → Bool # (/=) ∷ TxMetadataSupportedInEra era → TxMetadataSupportedInEra era → Bool # | |
| Show (TxMetadataSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxMetadataSupportedInEra era → ShowS # show ∷ TxMetadataSupportedInEra era → String # showList ∷ [TxMetadataSupportedInEra era] → ShowS # | |
data AuxScriptsSupportedInEra era where Source #
A representation of whether the era supports auxiliary scripts in transactions.
Auxiliary scripts are supported from the Allegra era onwards.
Constructors
| AuxScriptsInAllegraEra ∷ AuxScriptsSupportedInEra AllegraEra | |
| AuxScriptsInMaryEra ∷ AuxScriptsSupportedInEra MaryEra | |
| AuxScriptsInAlonzoEra ∷ AuxScriptsSupportedInEra AlonzoEra |
Instances
| Eq (AuxScriptsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ AuxScriptsSupportedInEra era → AuxScriptsSupportedInEra era → Bool # (/=) ∷ AuxScriptsSupportedInEra era → AuxScriptsSupportedInEra era → Bool # | |
| Show (AuxScriptsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → AuxScriptsSupportedInEra era → ShowS # show ∷ AuxScriptsSupportedInEra era → String # showList ∷ [AuxScriptsSupportedInEra era] → ShowS # | |
data TxExtraKeyWitnessesSupportedInEra era where Source #
A representation of whether the era supports transactions that specify in the body that they need extra key witnesses, and where this fact is visible to scripts.
Extra key witnesses visible to scripts are supported from the Alonzo era onwards.
Instances
| Eq (TxExtraKeyWitnessesSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxExtraKeyWitnessesSupportedInEra era → TxExtraKeyWitnessesSupportedInEra era → Bool # (/=) ∷ TxExtraKeyWitnessesSupportedInEra era → TxExtraKeyWitnessesSupportedInEra era → Bool # | |
| Show (TxExtraKeyWitnessesSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxExtraKeyWitnessesSupportedInEra era → ShowS # show ∷ TxExtraKeyWitnessesSupportedInEra era → String # showList ∷ [TxExtraKeyWitnessesSupportedInEra era] → ShowS # | |
data ScriptDataSupportedInEra era where Source #
A representation of whether the era supports multi-asset transactions.
The Mary and subsequent eras support multi-asset transactions.
The negation of this is OnlyAdaSupportedInEra.
Constructors
| ScriptDataInAlonzoEra ∷ ScriptDataSupportedInEra AlonzoEra | Script data is supported in transactions in the |
Instances
| Eq (ScriptDataSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ScriptDataSupportedInEra era → ScriptDataSupportedInEra era → Bool # (/=) ∷ ScriptDataSupportedInEra era → ScriptDataSupportedInEra era → Bool # | |
| Show (ScriptDataSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → ScriptDataSupportedInEra era → ShowS # show ∷ ScriptDataSupportedInEra era → String # showList ∷ [ScriptDataSupportedInEra era] → ShowS # | |
data WithdrawalsSupportedInEra era where Source #
A representation of whether the era supports withdrawals from reward accounts.
The Shelley and subsequent eras support stake addresses, their associated reward accounts and support for withdrawals from them.
Constructors
Instances
| Eq (WithdrawalsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ WithdrawalsSupportedInEra era → WithdrawalsSupportedInEra era → Bool # (/=) ∷ WithdrawalsSupportedInEra era → WithdrawalsSupportedInEra era → Bool # | |
| Show (WithdrawalsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → WithdrawalsSupportedInEra era → ShowS # show ∷ WithdrawalsSupportedInEra era → String # showList ∷ [WithdrawalsSupportedInEra era] → ShowS # | |
data CertificatesSupportedInEra era where Source #
A representation of whether the era supports Certificates embedded in
transactions.
The Shelley and subsequent eras support such certificates.
Constructors
Instances
| Eq (CertificatesSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ CertificatesSupportedInEra era → CertificatesSupportedInEra era → Bool # (/=) ∷ CertificatesSupportedInEra era → CertificatesSupportedInEra era → Bool # | |
| Show (CertificatesSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → CertificatesSupportedInEra era → ShowS # show ∷ CertificatesSupportedInEra era → String # showList ∷ [CertificatesSupportedInEra era] → ShowS # | |
data UpdateProposalSupportedInEra era where Source #
A representation of whether the era supports UpdateProposals embedded in
transactions.
The Shelley and subsequent eras support such update proposals. They Byron era has a notion of an update proposal, but it is a standalone chain object and not embedded in a transaction.
Constructors
Instances
| Eq (UpdateProposalSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ UpdateProposalSupportedInEra era → UpdateProposalSupportedInEra era → Bool # (/=) ∷ UpdateProposalSupportedInEra era → UpdateProposalSupportedInEra era → Bool # | |
| Show (UpdateProposalSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → UpdateProposalSupportedInEra era → ShowS # show ∷ UpdateProposalSupportedInEra era → String # showList ∷ [UpdateProposalSupportedInEra era] → ShowS # | |
Feature availability functions
collateralSupportedInEra ∷ CardanoEra era → Maybe (CollateralSupportedInEra era) Source #
multiAssetSupportedInEra ∷ CardanoEra era → Either (OnlyAdaSupportedInEra era) (MultiAssetSupportedInEra era) Source #
txFeesExplicitInEra ∷ CardanoEra era → Either (TxFeesImplicitInEra era) (TxFeesExplicitInEra era) Source #
validityUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityUpperBoundSupportedInEra era) Source #
validityNoUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityNoUpperBoundSupportedInEra era) Source #
validityLowerBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityLowerBoundSupportedInEra era) Source #
txMetadataSupportedInEra ∷ CardanoEra era → Maybe (TxMetadataSupportedInEra era) Source #
auxScriptsSupportedInEra ∷ CardanoEra era → Maybe (AuxScriptsSupportedInEra era) Source #
extraKeyWitnessesSupportedInEra ∷ CardanoEra era → Maybe (TxExtraKeyWitnessesSupportedInEra era) Source #
withdrawalsSupportedInEra ∷ CardanoEra era → Maybe (WithdrawalsSupportedInEra era) Source #
certificatesSupportedInEra ∷ CardanoEra era → Maybe (CertificatesSupportedInEra era) Source #
scriptDataSupportedInEra ∷ CardanoEra era → Maybe (ScriptDataSupportedInEra era) Source #
Fee calculation
Arguments
| ∷ ∀ era. IsShelleyBasedEra era | |
| ⇒ Natural | The fixed tx fee |
| → Natural | The tx fee per byte |
| → Tx era | |
| → Lovelace |
For a concrete fully-constructed transaction, determine the minimum fee that it needs to pay.
This function is simple, but if you are doing input selection then you probably want to consider estimateTransactionFee.
estimateTransactionFee Source #
Arguments
| ∷ ∀ era. IsShelleyBasedEra era | |
| ⇒ NetworkId | |
| → Natural | The fixed tx fee |
| → Natural | The tx fee per byte |
| → Tx era | |
| → Int | The number of extra UTxO transaction inputs |
| → Int | The number of extra transaction outputs |
| → Int | The number of extra Shelley key witnesses |
| → Int | The number of extra Byron key witnesses |
| → Lovelace |
This can estimate what the transaction fee will be, based on a starting base transaction, plus the numbers of the additional components of the transaction that may be added.
So for example with wallet coin selection, the base transaction should contain all the things not subject to coin selection (such as script inputs, metadata, withdrawals, certs etc)
evaluateTransactionFee Source #
Arguments
| ∷ ∀ era. IsShelleyBasedEra era | |
| ⇒ ProtocolParameters | |
| → TxBody era | |
| → Word | The number of Shelley key witnesses |
| → Word | The number of Byron key witnesses |
| → Lovelace |
Compute the transaction fee for a proposed transaction, with the assumption that there will be the given number of key witnesses (i.e. signatures).
TODO: we need separate args for Shelley vs Byron key sigs
estimateTransactionKeyWitnessCount ∷ TxBodyContent BuildTx era → Word Source #
Give an approximate count of the number of key witnesses (i.e. signatures) a transaction will need.
This is an estimate not a precise count in that it can over-estimate: it makes conservative assumptions such as all inputs are from distinct addresses, but in principle multiple inputs can use the same address and we only need a witness per address.
Similarly there can be overlap between the regular and collateral inputs, but we conservatively assume they are distinct.
TODO: it is worth us considering a more precise count that relies on the UTxO to resolve which inputs are for distinct addresses, and also to count the number of Shelley vs Byron style witnesses.
Script execution units
evaluateTransactionExecutionUnits ∷ ∀ era mode. EraInMode era mode → SystemStart → EraHistory mode → ProtocolParameters → UTxO era → TxBody era → Either TransactionValidityIntervalError (Map ScriptWitnessIndex (Either ScriptExecutionError ExecutionUnits)) Source #
Compute the ExecutionUnits needed for each script in the transaction.
This works by running all the scripts and counting how many execution units are actually used.
data ScriptExecutionError Source #
The different possible reasons that executing a script can fail,
as reported by evaluateTransactionExecutionUnits.
The first three of these are about failures before we even get to execute the script, and two are the result of execution.
Constructors
| ScriptErrorMissingTxIn TxIn | The script depends on a |
| ScriptErrorTxInWithoutDatum TxIn | The |
| ScriptErrorWrongDatum (Hash ScriptData) | The |
| ScriptErrorEvaluationFailed EvaluationError | The script evaluation failed. This usually means it evaluated to an
error value. This is not a case of running out of execution units
(which is not possible for |
| ScriptErrorExecutionUnitsOverflow | The execution units overflowed a 64bit word. Congratulations if you encounter this error. With the current style of cost model this would need a script to run for over 7 months, which is somewhat more than the expected maximum of a few milliseconds. |
Instances
| Show ScriptExecutionError Source # | |
Defined in Cardano.Api.Fees Methods showsPrec ∷ Int → ScriptExecutionError → ShowS # show ∷ ScriptExecutionError → String # showList ∷ [ScriptExecutionError] → ShowS # | |
| Error ScriptExecutionError Source # | |
Defined in Cardano.Api.Fees Methods | |
data TransactionValidityIntervalError Source #
The transaction validity interval is too far into the future.
Transactions with Plutus scripts need to have a validity interval that is not so far in the future that we cannot reliably determine the UTC time corresponding to the validity interval expressed in slot numbers.
This is because the Plutus scripts get given the transaction validity interval in UTC time, so that they are not sensitive to slot lengths.
If either end of the validity interval is beyond the so called "time horizon" then the consensus algorithm is not able to reliably determine the relationship between slots and time. This is this situation in which this error is reported. For the Cardano mainnet the time horizon is 36 hours beyond the current time. This effectively means we cannot submit check or submit transactions that use Plutus scripts that have the end of their validity interval more than 36 hours into the future.
Instances
| Show TransactionValidityIntervalError Source # | |
Defined in Cardano.Api.Fees | |
| Error TransactionValidityIntervalError Source # | |
Defined in Cardano.Api.Fees Methods displayError ∷ TransactionValidityIntervalError → String Source # | |
Transaction balance
evaluateTransactionBalance ∷ ∀ era. IsShelleyBasedEra era ⇒ ProtocolParameters → Set PoolId → UTxO era → TxBody era → TxOutValue era Source #
Compute the total balance of the proposed transaction. Ultimately a valid transaction must be fully balanced: that is have a total value of zero.
Finding the (non-zero) balance of partially constructed transaction is useful for adjusting a transaction to be fully balanced.
Building transactions with automated fees and balancing
makeTransactionBodyAutoBalance Source #
Arguments
| ∷ ∀ era mode. IsShelleyBasedEra era | |
| ⇒ EraInMode era mode | |
| → SystemStart | |
| → EraHistory mode | |
| → ProtocolParameters | |
| → Set PoolId | The set of registered stake pools |
| → UTxO era | Just the transaction inputs, not the entire |
| → TxBodyContent BuildTx era | |
| → AddressInEra era | Change address |
| → Maybe Word | Override key witnesses |
| → Either (TxBodyErrorAutoBalance era) (TxBody era) |
This is much like makeTransactionBody but with greater automation to
calculate suitable values for several things.
In particular:
- It calculates the correct script
ExecutionUnits(ignoring the provided values, which can thus be zero). - It calculates the transaction fees, based on the script
ExecutionUnits, the currentProtocolParameters, and an estimate of the number of key witnesses (i.e. signatures). There is an override for the number of key witnesses. - It accepts a change address, calculates the balance of the transaction and puts the excess change into the change output.
- It also checks that the balance is positive and the change is above the minimum threshold.
To do this it needs more information than makeTransactionBody, all of
which can be queried from a local node.
data TxBodyErrorAutoBalance era Source #
The possible errors that can arise from makeTransactionBodyAutoBalance.
Constructors
| TxBodyError (TxBodyError era) | The same errors that can arise from |
| TxBodyScriptExecutionError [(ScriptWitnessIndex, ScriptExecutionError)] | One or more of the scripts fails to execute correctly. |
| TxBodyErrorAssetBalanceWrong Value | The balance of the non-ada assets is not zero. The |
| TxBodyErrorAdaBalanceNegative Lovelace | There is not enough ada to cover both the outputs and the fees. The transaction should be changed to provide more input ada, or otherwise adjusted to need less (e.g. outputs, script etc). |
| TxBodyErrorAdaBalanceTooSmall Lovelace | There is enough ada to cover both the outputs and the fees, but the resulting change is too small: it is under the minimum value for new UTxO entries. The transaction should be changed to provide more input ada. |
| TxBodyErrorByronEraNotSupported |
|
| TxBodyErrorMissingParamMinUTxO | The |
| TxBodyErrorMissingParamCostPerWord | The |
| TxBodyErrorValidityInterval TransactionValidityIntervalError |
Instances
| Show (TxBodyErrorAutoBalance era) Source # | |
Defined in Cardano.Api.Fees Methods showsPrec ∷ Int → TxBodyErrorAutoBalance era → ShowS # show ∷ TxBodyErrorAutoBalance era → String # showList ∷ [TxBodyErrorAutoBalance era] → ShowS # | |
| Error (TxBodyErrorAutoBalance era) Source # | |
Defined in Cardano.Api.Fees Methods displayError ∷ TxBodyErrorAutoBalance era → String Source # | |
Signing transactions
Creating transaction witnesses one by one, or all in one go.
Bundled Patterns
| pattern Tx ∷ Era era ⇒ TxBody era → [KeyWitness era] → Tx era |
Instances
| Eq (Tx era) Source # | |
| Show (Tx era) Source # | |
| HasTypeProxy era ⇒ HasTypeProxy (Tx era) Source # | |
| IsCardanoEra era ⇒ SerialiseAsCBOR (Tx era) Source # | |
Defined in Cardano.Api.Tx Methods serialiseToCBOR ∷ Tx era → ByteString Source # deserialiseFromCBOR ∷ AsType (Tx era) → ByteString → Either DecoderError (Tx era) Source # | |
| IsCardanoEra era ⇒ HasTextEnvelope (Tx era) Source # | |
Defined in Cardano.Api.Tx Methods textEnvelopeType ∷ AsType (Tx era) → TextEnvelopeType Source # textEnvelopeDefaultDescr ∷ Tx era → TextEnvelopeDescr Source # | |
| data AsType (Tx era) Source # | |
Defined in Cardano.Api.Tx | |
getTxWitnesses ∷ ∀ era. Tx era → [KeyWitness era] Source #
Signing in one go
signShelleyTransaction ∷ IsShelleyBasedEra era ⇒ TxBody era → [ShelleyWitnessSigningKey] → Tx era Source #
Incremental signing and separate witnesses
makeSignedTransaction ∷ ∀ era. [KeyWitness era] → TxBody era → Tx era Source #
data KeyWitness era Source #
Instances
makeByronKeyWitness ∷ ∀ key. IsByronKey key ⇒ NetworkId → TxBody ByronEra → SigningKey key → KeyWitness ByronEra Source #
data ShelleyWitnessSigningKey Source #
Constructors
makeShelleyKeyWitness ∷ ∀ era. IsShelleyBasedEra era ⇒ TxBody era → ShelleyWitnessSigningKey → KeyWitness era Source #
makeShelleyBootstrapWitness ∷ ∀ era. IsShelleyBasedEra era ⇒ WitnessNetworkIdOrByronAddress → TxBody era → SigningKey ByronKey → KeyWitness era Source #
Transaction metadata
Embedding additional structured data within transactions.
newtype TxMetadata Source #
Constructors
| TxMetadata (Map Word64 TxMetadataValue) |
Instances
Constructing metadata
data TxMetadataValue Source #
Constructors
| TxMetaMap [(TxMetadataValue, TxMetadataValue)] | |
| TxMetaList [TxMetadataValue] | |
| TxMetaNumber Integer | |
| TxMetaBytes ByteString | |
| TxMetaText Text |
Instances
| Eq TxMetadataValue Source # | |
Defined in Cardano.Api.TxMetadata Methods (==) ∷ TxMetadataValue → TxMetadataValue → Bool # (/=) ∷ TxMetadataValue → TxMetadataValue → Bool # | |
| Ord TxMetadataValue Source # | |
Defined in Cardano.Api.TxMetadata Methods compare ∷ TxMetadataValue → TxMetadataValue → Ordering # (<) ∷ TxMetadataValue → TxMetadataValue → Bool # (<=) ∷ TxMetadataValue → TxMetadataValue → Bool # (>) ∷ TxMetadataValue → TxMetadataValue → Bool # (>=) ∷ TxMetadataValue → TxMetadataValue → Bool # | |
| Show TxMetadataValue Source # | |
Defined in Cardano.Api.TxMetadata Methods showsPrec ∷ Int → TxMetadataValue → ShowS # show ∷ TxMetadataValue → String # showList ∷ [TxMetadataValue] → ShowS # | |
Validating metadata
validateTxMetadata ∷ TxMetadata → Either [(Word64, TxMetadataRangeError)] () Source #
Validate transaction metadata. This is for use with existing constructed metadata values, e.g. constructed manually or decoded from CBOR directly.
data TxMetadataRangeError Source #
An error in transaction metadata due to an out-of-range value.
Constructors
| TxMetadataNumberOutOfRange !Integer | The number is outside the maximum range of |
| TxMetadataTextTooLong !Int | The length of a text string metadatum value exceeds the maximum of 64 bytes as UTF8. |
| TxMetadataBytesTooLong !Int | The length of a byte string metadatum value exceeds the maximum of 64 bytes. |
Instances
| Eq TxMetadataRangeError Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
| Show TxMetadataRangeError Source # | |
Defined in Cardano.Api.TxMetadata Methods showsPrec ∷ Int → TxMetadataRangeError → ShowS # show ∷ TxMetadataRangeError → String # showList ∷ [TxMetadataRangeError] → ShowS # | |
| Error TxMetadataRangeError Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
Converstion to/from JSON
data TxMetadataJsonSchema Source #
Tx metadata is similar to JSON but not exactly the same. It has some deliberate limitations such as no support for floating point numbers or special forms for null or boolean values. It also has limitations on the length of strings. On the other hand, unlike JSON, it distinguishes between byte strings and text strings. It also supports any value as map keys rather than just string.
We provide two different mappings between tx metadata and JSON, useful for different purposes:
- A mapping that allows almost any JSON value to be converted into tx metadata. This does not require a specific JSON schema for the input. It does not expose the full representation capability of tx metadata.
- A mapping that exposes the full representation capability of tx metadata, but relies on a specific JSON schema for the input JSON.
In the "no schema" mapping, the idea is that (almost) any JSON can be turned into tx metadata and then converted back, without loss. That is, we can round-trip the JSON.
The subset of JSON supported is all JSON except: * No null or bool values * No floating point, only integers in the range of a 64bit signed integer * A limitation on string lengths
The approach for this mapping is to use whichever representation as tx metadata is most compact. In particular:
- JSON lists and maps represented as CBOR lists and maps
- JSON strings represented as CBOR strings
- JSON hex strings with "0x" prefix represented as CBOR byte strings
- JSON integer numbers represented as CBOR signed or unsigned numbers
- JSON maps with string keys that parse as numbers or hex byte strings, represented as CBOR map keys that are actually numbers or byte strings.
The string length limit depends on whether the hex string representation is used or not. For text strings the limit is 64 bytes for the UTF8 representation of the text string. For byte strings the limit is 64 bytes for the raw byte form (ie not the input hex, but after hex decoding).
In the "detailed schema" mapping, the idea is that we expose the full representation capability of the tx metadata in the form of a JSON schema. This means the full representation is available and can be controlled precisely. It also means any tx metadata can be converted into the JSON and back without loss. That is we can round-trip the tx metadata via the JSON and also round-trip schema-compliant JSON via tx metadata.
Constructors
| TxMetadataJsonNoSchema | Use the "no schema" mapping between JSON and tx metadata as described above. |
| TxMetadataJsonDetailedSchema | Use the "detailed schema" mapping between JSON and tx metadata as described above. |
Instances
| Eq TxMetadataJsonSchema Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
| Show TxMetadataJsonSchema Source # | |
Defined in Cardano.Api.TxMetadata Methods showsPrec ∷ Int → TxMetadataJsonSchema → ShowS # show ∷ TxMetadataJsonSchema → String # showList ∷ [TxMetadataJsonSchema] → ShowS # | |
metadataFromJson ∷ TxMetadataJsonSchema → Value → Either TxMetadataJsonError TxMetadata Source #
Convert a value from JSON into tx metadata, using the given choice of mapping between JSON and tx metadata.
This may fail with a conversion error if the JSON is outside the supported
subset for the chosen mapping. See TxMetadataJsonSchema for the details.
metadataToJson ∷ TxMetadataJsonSchema → TxMetadata → Value Source #
Convert a tx metadata value into JSON , using the given choice of mapping between JSON and tx metadata.
This conversion is total but is not necessarily invertible.
See TxMetadataJsonSchema for the details.
metadataValueToJsonNoSchema ∷ TxMetadataValue → Value Source #
data TxMetadataJsonError Source #
Constructors
| TxMetadataJsonToplevelNotMap | |
| TxMetadataJsonToplevelBadKey !Text | |
| TxMetadataJsonSchemaError !Word64 !Value !TxMetadataJsonSchemaError | |
| TxMetadataRangeError !Word64 !Value !TxMetadataRangeError |
Instances
| Eq TxMetadataJsonError Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
| Show TxMetadataJsonError Source # | |
Defined in Cardano.Api.TxMetadata Methods showsPrec ∷ Int → TxMetadataJsonError → ShowS # show ∷ TxMetadataJsonError → String # showList ∷ [TxMetadataJsonError] → ShowS # | |
| Error TxMetadataJsonError Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
data TxMetadataJsonSchemaError Source #
Constructors
Instances
| Eq TxMetadataJsonSchemaError Source # | |
Defined in Cardano.Api.TxMetadata | |
| Show TxMetadataJsonSchemaError Source # | |
Defined in Cardano.Api.TxMetadata Methods showsPrec ∷ Int → TxMetadataJsonSchemaError → ShowS # | |
| Error TxMetadataJsonSchemaError Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
Certificates
data Certificate Source #
Instances
Registering stake address and delegating
Certificates that are embedded in transactions for registering and unregistering stake address, and for setting the stake pool delegation choice for a stake address.
Registering stake pools
Certificates that are embedded in transactions for registering and retiring stake pools. This includes updating the stake pool parameters.
data StakePoolParameters Source #
Instances
| Eq StakePoolParameters Source # | |
Defined in Cardano.Api.Certificate Methods | |
| Show StakePoolParameters Source # | |
Defined in Cardano.Api.Certificate Methods showsPrec ∷ Int → StakePoolParameters → ShowS # show ∷ StakePoolParameters → String # showList ∷ [StakePoolParameters] → ShowS # | |
data StakePoolRelay Source #
Instances
| Eq StakePoolRelay Source # | |
Defined in Cardano.Api.Certificate Methods (==) ∷ StakePoolRelay → StakePoolRelay → Bool # (/=) ∷ StakePoolRelay → StakePoolRelay → Bool # | |
| Show StakePoolRelay Source # | |
Defined in Cardano.Api.Certificate Methods showsPrec ∷ Int → StakePoolRelay → ShowS # show ∷ StakePoolRelay → String # showList ∷ [StakePoolRelay] → ShowS # | |
data StakePoolMetadataReference Source #
Instances
| Eq StakePoolMetadataReference Source # | |
Defined in Cardano.Api.Certificate | |
| Show StakePoolMetadataReference Source # | |
Defined in Cardano.Api.Certificate Methods showsPrec ∷ Int → StakePoolMetadataReference → ShowS # | |
Stake pool off-chain metadata
data StakePoolMetadata Source #
A representation of the required fields for off-chain stake pool metadata.
Instances
validateAndHashStakePoolMetadata ∷ ByteString → Either StakePoolMetadataValidationError (StakePoolMetadata, Hash StakePoolMetadata) Source #
Decode and validate the provided JSON-encoded bytes as StakePoolMetadata.
Return the decoded metadata and the hash of the original bytes.
data StakePoolMetadataValidationError Source #
A stake pool metadata validation error.
Instances
Scripts
Both PaymentCredentials and StakeCredentials can use scripts.
Script languages
data SimpleScriptV1 Source #
The original simple script language which supports
- require a signature from a given key (by verification key hash)
- n-way and combinator
- n-way or combinator
- m-of-n combinator
This version of the language was introduced in the ShelleyEra.
Instances
| HasTypeProxy SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script Associated Types data AsType SimpleScriptV1 Source # Methods proxyToAsType ∷ Proxy SimpleScriptV1 → AsType SimpleScriptV1 Source # | |
| IsSimpleScriptLanguage SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script | |
| IsScriptLanguage SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script Methods | |
| data AsType SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script | |
data SimpleScriptV2 Source #
The second version of the simple script language. It has all the features
of SimpleScriptV1 plus new atomic predicates:
- require the time be before a given slot number
- require the time be after a given slot number
This version of the language was introduced in the AllegraEra.
Instances
| HasTypeProxy SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script Associated Types data AsType SimpleScriptV2 Source # Methods proxyToAsType ∷ Proxy SimpleScriptV2 → AsType SimpleScriptV2 Source # | |
| IsSimpleScriptLanguage SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script | |
| IsScriptLanguage SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script Methods | |
| data AsType SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script | |
data PlutusScriptV1 Source #
Place holder type to show what the pattern is to extend to multiple languages, not just multiple versions of a single language.
Instances
| HasTypeProxy PlutusScriptV1 Source # | |
Defined in Cardano.Api.Script Associated Types data AsType PlutusScriptV1 Source # Methods proxyToAsType ∷ Proxy PlutusScriptV1 → AsType PlutusScriptV1 Source # | |
| IsScriptLanguage PlutusScriptV1 Source # | |
Defined in Cardano.Api.Script Methods | |
| data AsType PlutusScriptV1 Source # | |
Defined in Cardano.Api.Script | |
data ScriptLanguage lang where Source #
Constructors
| SimpleScriptLanguage ∷ SimpleScriptVersion lang → ScriptLanguage lang | |
| PlutusScriptLanguage ∷ PlutusScriptVersion lang → ScriptLanguage lang |
Instances
| Eq (ScriptLanguage lang) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ScriptLanguage lang → ScriptLanguage lang → Bool # (/=) ∷ ScriptLanguage lang → ScriptLanguage lang → Bool # | |
| Show (ScriptLanguage lang) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → ScriptLanguage lang → ShowS # show ∷ ScriptLanguage lang → String # showList ∷ [ScriptLanguage lang] → ShowS # | |
| TestEquality ScriptLanguage Source # | |
Defined in Cardano.Api.Script Methods testEquality ∷ ∀ (a ∷ k) (b ∷ k). ScriptLanguage a → ScriptLanguage b → Maybe (a :~: b) # | |
data SimpleScriptVersion lang where Source #
Constructors
| SimpleScriptV1 ∷ SimpleScriptVersion SimpleScriptV1 | |
| SimpleScriptV2 ∷ SimpleScriptVersion SimpleScriptV2 |
Instances
| Eq (SimpleScriptVersion lang) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ SimpleScriptVersion lang → SimpleScriptVersion lang → Bool # (/=) ∷ SimpleScriptVersion lang → SimpleScriptVersion lang → Bool # | |
| Show (SimpleScriptVersion lang) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → SimpleScriptVersion lang → ShowS # show ∷ SimpleScriptVersion lang → String # showList ∷ [SimpleScriptVersion lang] → ShowS # | |
| TestEquality SimpleScriptVersion Source # | |
Defined in Cardano.Api.Script Methods testEquality ∷ ∀ (a ∷ k) (b ∷ k). SimpleScriptVersion a → SimpleScriptVersion b → Maybe (a :~: b) # | |
data PlutusScriptVersion lang where Source #
Constructors
| PlutusScriptV1 ∷ PlutusScriptVersion PlutusScriptV1 |
Instances
| Eq (PlutusScriptVersion lang) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ PlutusScriptVersion lang → PlutusScriptVersion lang → Bool # (/=) ∷ PlutusScriptVersion lang → PlutusScriptVersion lang → Bool # | |
| Show (PlutusScriptVersion lang) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → PlutusScriptVersion lang → ShowS # show ∷ PlutusScriptVersion lang → String # showList ∷ [PlutusScriptVersion lang] → ShowS # | |
| TestEquality PlutusScriptVersion Source # | |
Defined in Cardano.Api.Script Methods testEquality ∷ ∀ (a ∷ k) (b ∷ k). PlutusScriptVersion a → PlutusScriptVersion b → Maybe (a :~: b) # | |
data AnyScriptLanguage where Source #
Constructors
| AnyScriptLanguage ∷ ScriptLanguage lang → AnyScriptLanguage |
Instances
data AnyPlutusScriptVersion where Source #
Constructors
| AnyPlutusScriptVersion ∷ PlutusScriptVersion lang → AnyPlutusScriptVersion |
Instances
class HasTypeProxy lang ⇒ IsScriptLanguage lang where Source #
Methods
scriptLanguage ∷ ScriptLanguage lang Source #
Instances
| IsScriptLanguage PlutusScriptV1 Source # | |
Defined in Cardano.Api.Script Methods | |
| IsScriptLanguage SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script Methods | |
| IsScriptLanguage SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script Methods | |
Scripts in a specific language
data Script lang where Source #
A script in a particular language.
See also ScriptInAnyLang for a script in any of the known languages.
See also ScriptInEra for a script in a language that is available within
a particular era.
Note that some but not all scripts have an external JSON syntax, hence this
type has no JSON serialisation instances. The SimpleScript family of
languages do have a JSON syntax and thus have ToJSON/FromJSON instances.
Constructors
| SimpleScript ∷ !(SimpleScriptVersion lang) → !(SimpleScript lang) → Script lang | |
| PlutusScript ∷ !(PlutusScriptVersion lang) → !(PlutusScript lang) → Script lang |
Instances
| Eq (Script lang) Source # | |
| Show (Script lang) Source # | |
| HasTypeProxy lang ⇒ HasTypeProxy (Script lang) Source # | |
| IsScriptLanguage lang ⇒ SerialiseAsCBOR (Script lang) Source # | |
Defined in Cardano.Api.Script Methods serialiseToCBOR ∷ Script lang → ByteString Source # deserialiseFromCBOR ∷ AsType (Script lang) → ByteString → Either DecoderError (Script lang) Source # | |
| IsScriptLanguage lang ⇒ HasTextEnvelope (Script lang) Source # | |
Defined in Cardano.Api.Script Methods textEnvelopeType ∷ AsType (Script lang) → TextEnvelopeType Source # textEnvelopeDefaultDescr ∷ Script lang → TextEnvelopeDescr Source # | |
| data AsType (Script lang) Source # | |
Defined in Cardano.Api.Script | |
Scripts in any language
data ScriptInAnyLang where Source #
Sometimes it is necessary to handle all languages without making static type distinctions between languages. For example, when reading external input, or before the era context is known.
Use toScriptInEra to convert to a script in the context of an era.
Constructors
| ScriptInAnyLang ∷ ScriptLanguage lang → Script lang → ScriptInAnyLang |
Instances
| Eq ScriptInAnyLang Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ScriptInAnyLang → ScriptInAnyLang → Bool # (/=) ∷ ScriptInAnyLang → ScriptInAnyLang → Bool # | |
| Show ScriptInAnyLang Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → ScriptInAnyLang → ShowS # show ∷ ScriptInAnyLang → String # showList ∷ [ScriptInAnyLang] → ShowS # | |
| HasTypeProxy ScriptInAnyLang Source # | |
Defined in Cardano.Api.Script Associated Types data AsType ScriptInAnyLang Source # Methods proxyToAsType ∷ Proxy ScriptInAnyLang → AsType ScriptInAnyLang Source # | |
| data AsType ScriptInAnyLang Source # | |
Defined in Cardano.Api.Script | |
toScriptInAnyLang ∷ Script lang → ScriptInAnyLang Source #
Convert a script in a specific statically-known language to a
ScriptInAnyLang.
No inverse to this is provided, just do case analysis on the ScriptLanguage
field within the ScriptInAnyLang constructor.
Scripts in a specific era
data ScriptInEra era where Source #
Constructors
| ScriptInEra ∷ ScriptLanguageInEra lang era → Script lang → ScriptInEra era |
Instances
| Eq (ScriptInEra era) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ScriptInEra era → ScriptInEra era → Bool # (/=) ∷ ScriptInEra era → ScriptInEra era → Bool # | |
| Show (ScriptInEra era) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → ScriptInEra era → ShowS # show ∷ ScriptInEra era → String # showList ∷ [ScriptInEra era] → ShowS # | |
| HasTypeProxy era ⇒ HasTypeProxy (ScriptInEra era) Source # | |
Defined in Cardano.Api.Script Associated Types data AsType (ScriptInEra era) Source # Methods proxyToAsType ∷ Proxy (ScriptInEra era) → AsType (ScriptInEra era) Source # | |
| data AsType (ScriptInEra era) Source # | |
Defined in Cardano.Api.Script | |
toScriptInEra ∷ CardanoEra era → ScriptInAnyLang → Maybe (ScriptInEra era) Source #
Given a target era and a script in some language, check if the language is
supported in that era, and if so return a ScriptInEra.
eraOfScriptInEra ∷ ScriptInEra era → ShelleyBasedEra era Source #
Use of a script in an era as a witness
data WitCtxTxIn Source #
A tag type for the context in which a script is used in a transaction.
This type tags the context as being to witness a transaction input.
data WitCtxMint Source #
A tag type for the context in which a script is used in a transaction.
This type tags the context as being to witness minting.
data WitCtxStake Source #
A tag type for the context in which a script is used in a transaction.
This type tags the context as being to witness the use of stake addresses in both certificates and withdrawals.
data WitCtx witctx where Source #
This GADT provides a value-level representation of all the witness contexts. This enables pattern matching on the context to allow them to be treated in a non-uniform way.
Constructors
| WitCtxTxIn ∷ WitCtx WitCtxTxIn | |
| WitCtxMint ∷ WitCtx WitCtxMint | |
| WitCtxStake ∷ WitCtx WitCtxStake |
data ScriptWitness witctx era where Source #
A use of a script within a transaction body to witness that something is being used in an authorised manner. That can be
- spending a transaction input
- minting tokens
- using a certificate (stake address certs specifically)
- withdrawing from a reward account
For simple script languages, the use of the script is the same in all contexts. For Plutus scripts, using a script involves supplying a redeemer. In addition, Plutus scripts used for spending inputs must also supply the datum value used when originally creating the TxOut that is now being spent.
Constructors
| SimpleScriptWitness ∷ ScriptLanguageInEra lang era → SimpleScriptVersion lang → SimpleScript lang → ScriptWitness witctx era | |
| PlutusScriptWitness ∷ ScriptLanguageInEra lang era → PlutusScriptVersion lang → PlutusScript lang → ScriptDatum witctx → ScriptRedeemer → ExecutionUnits → ScriptWitness witctx era |
Instances
| Eq (ScriptWitness witctx era) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ScriptWitness witctx era → ScriptWitness witctx era → Bool # (/=) ∷ ScriptWitness witctx era → ScriptWitness witctx era → Bool # | |
| Show (ScriptWitness witctx era) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → ScriptWitness witctx era → ShowS # show ∷ ScriptWitness witctx era → String # showList ∷ [ScriptWitness witctx era] → ShowS # | |
data Witness witctx era where Source #
Constructors
| KeyWitness ∷ KeyWitnessInCtx witctx → Witness witctx era | |
| ScriptWitness ∷ ScriptWitnessInCtx witctx → ScriptWitness witctx era → Witness witctx era |
data KeyWitnessInCtx witctx where Source #
Constructors
| KeyWitnessForSpending ∷ KeyWitnessInCtx WitCtxTxIn | |
| KeyWitnessForStakeAddr ∷ KeyWitnessInCtx WitCtxStake |
Instances
| Eq (KeyWitnessInCtx witctx) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ KeyWitnessInCtx witctx → KeyWitnessInCtx witctx → Bool # (/=) ∷ KeyWitnessInCtx witctx → KeyWitnessInCtx witctx → Bool # | |
| Show (KeyWitnessInCtx witctx) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → KeyWitnessInCtx witctx → ShowS # show ∷ KeyWitnessInCtx witctx → String # showList ∷ [KeyWitnessInCtx witctx] → ShowS # | |
data ScriptWitnessInCtx witctx where Source #
Constructors
| ScriptWitnessForSpending ∷ ScriptWitnessInCtx WitCtxTxIn | |
| ScriptWitnessForMinting ∷ ScriptWitnessInCtx WitCtxMint | |
| ScriptWitnessForStakeAddr ∷ ScriptWitnessInCtx WitCtxStake |
Instances
| Eq (ScriptWitnessInCtx witctx) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ScriptWitnessInCtx witctx → ScriptWitnessInCtx witctx → Bool # (/=) ∷ ScriptWitnessInCtx witctx → ScriptWitnessInCtx witctx → Bool # | |
| Show (ScriptWitnessInCtx witctx) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → ScriptWitnessInCtx witctx → ShowS # show ∷ ScriptWitnessInCtx witctx → String # showList ∷ [ScriptWitnessInCtx witctx] → ShowS # | |
data ScriptDatum witctx where Source #
Constructors
| ScriptDatumForTxIn ∷ ScriptData → ScriptDatum WitCtxTxIn | |
| NoScriptDatumForMint ∷ ScriptDatum WitCtxMint | |
| NoScriptDatumForStake ∷ ScriptDatum WitCtxStake |
Instances
| Eq (ScriptDatum witctx) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ScriptDatum witctx → ScriptDatum witctx → Bool # (/=) ∷ ScriptDatum witctx → ScriptDatum witctx → Bool # | |
| Show (ScriptDatum witctx) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → ScriptDatum witctx → ShowS # show ∷ ScriptDatum witctx → String # showList ∷ [ScriptDatum witctx] → ShowS # | |
type ScriptRedeemer = ScriptData Source #
scriptWitnessScript ∷ ScriptWitness witctx era → ScriptInEra era Source #
Languages supported in each era
data ScriptLanguageInEra lang era where Source #
Constructors
Instances
| Eq (ScriptLanguageInEra lang era) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ScriptLanguageInEra lang era → ScriptLanguageInEra lang era → Bool # (/=) ∷ ScriptLanguageInEra lang era → ScriptLanguageInEra lang era → Bool # | |
| Show (ScriptLanguageInEra lang era) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → ScriptLanguageInEra lang era → ShowS # show ∷ ScriptLanguageInEra lang era → String # showList ∷ [ScriptLanguageInEra lang era] → ShowS # | |
scriptLanguageSupportedInEra ∷ CardanoEra era → ScriptLanguage lang → Maybe (ScriptLanguageInEra lang era) Source #
Check if a given script language is supported in a given era, and if so return the evidence.
languageOfScriptLanguageInEra ∷ ScriptLanguageInEra lang era → ScriptLanguage lang Source #
eraOfScriptLanguageInEra ∷ ScriptLanguageInEra lang era → ShelleyBasedEra era Source #
Simple scripts
Making multi-signature and time-lock scripts.
data SimpleScript lang where Source #
Constructors
| RequireSignature ∷ !(Hash PaymentKey) → SimpleScript lang | |
| RequireTimeBefore ∷ !(TimeLocksSupported lang) → !SlotNo → SimpleScript lang | |
| RequireTimeAfter ∷ !(TimeLocksSupported lang) → !SlotNo → SimpleScript lang | |
| RequireAllOf ∷ [SimpleScript lang] → SimpleScript lang | |
| RequireAnyOf ∷ [SimpleScript lang] → SimpleScript lang | |
| RequireMOf ∷ Int → [SimpleScript lang] → SimpleScript lang |
Instances
data TimeLocksSupported lang where Source #
Time lock feature in the SimpleScript language.
The constructors of this type serve as evidence that the timelocks feature is supported in particular versions of the language.
Constructors
| TimeLocksInSimpleScriptV2 ∷ TimeLocksSupported SimpleScriptV2 |
Instances
| Eq (TimeLocksSupported lang) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ TimeLocksSupported lang → TimeLocksSupported lang → Bool # (/=) ∷ TimeLocksSupported lang → TimeLocksSupported lang → Bool # | |
| Show (TimeLocksSupported lang) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → TimeLocksSupported lang → ShowS # show ∷ TimeLocksSupported lang → String # showList ∷ [TimeLocksSupported lang] → ShowS # | |
timeLocksSupported ∷ SimpleScriptVersion lang → Maybe (TimeLocksSupported lang) Source #
adjustSimpleScriptVersion ∷ SimpleScriptVersion lang' → SimpleScript lang → Maybe (SimpleScript lang') Source #
Try converting the SimpleScript into a different version of the language.
This will work when the script only uses the features of the target language
version. For example converting from SimpleScriptV2 to SimpleScriptV1
will work if the script happens not to use time locks feature. On the other
hand converting SimpleScriptV1 to SimpleScriptV2 will always work because
it is backwards compatible.
Plutus scripts
data PlutusScript lang Source #
Plutus scripts.
Note that Plutus scripts have a binary serialisation but no JSON serialisation.
Instances
examplePlutusScriptAlwaysSucceeds ∷ WitCtx witctx → PlutusScript PlutusScriptV1 Source #
An example Plutus script that always succeeds, irrespective of inputs.
For example, if one were to use this for a payment address then it would allow anyone to spend from it.
The exact script depends on the context in which it is to be used.
examplePlutusScriptAlwaysFails ∷ WitCtx witctx → PlutusScript PlutusScriptV1 Source #
An example Plutus script that always fails, irrespective of inputs.
For example, if one were to use this for a payment address then it would be impossible for anyone to ever spend from it.
The exact script depends on the context in which it is to be used.
Script data
data ScriptData Source #
Constructors
| ScriptDataConstructor Integer [ScriptData] | |
| ScriptDataMap [(ScriptData, ScriptData)] | |
| ScriptDataList [ScriptData] | |
| ScriptDataNumber Integer | |
| ScriptDataBytes ByteString |
Instances
Validation
data ScriptDataRangeError Source #
An error in script data due to an out-of-range value.
Constructors
| ScriptDataNumberOutOfRange !Integer | The number is outside the maximum range of |
| ScriptDataConstructorOutOfRange !Integer | The number is outside the maximum range of |
| ScriptDataBytesTooLong !Int | The length of a byte string metadatum value exceeds the maximum of 64 bytes. |
Instances
| Eq ScriptDataRangeError Source # | |
Defined in Cardano.Api.ScriptData Methods | |
| Show ScriptDataRangeError Source # | |
Defined in Cardano.Api.ScriptData Methods showsPrec ∷ Int → ScriptDataRangeError → ShowS # show ∷ ScriptDataRangeError → String # showList ∷ [ScriptDataRangeError] → ShowS # | |
| Error ScriptDataRangeError Source # | |
Defined in Cardano.Api.ScriptData Methods | |
validateScriptData ∷ ScriptData → Either ScriptDataRangeError () Source #
Validate script data. This is for use with existing constructed script data values, e.g. constructed manually or decoded from CBOR directly.
Conversion to/from JSON
data ScriptDataJsonSchema Source #
Script data is similar to JSON but not exactly the same. It has some deliberate limitations such as no support for floating point numbers or special forms for null or boolean values. It also has limitations on the length of strings. On the other hand, unlike JSON, it distinguishes between byte strings and text strings. It also supports any value as map keys rather than just string. It also supports alternatives / tagged unions, used for representing constructors for Plutus data values.
We provide two different mappings between script data and JSON, useful for different purposes:
- A mapping that allows almost any JSON value to be converted into script data. This does not require a specific JSON schema for the input. It does not expose the full representation capability of script data.
- A mapping that exposes the full representation capability of script data, but relies on a specific JSON schema for the input JSON.
In the "no schema" mapping, the idea is that (almost) any JSON can be turned into script data and then converted back, without loss. That is, we can round-trip the JSON.
The subset of JSON supported is all JSON except: * No null or bool values * No floating point, only integers in the range of a 64bit signed integer * A limitation on string lengths
The approach for this mapping is to use whichever representation as script data is most compact. In particular:
- JSON lists and maps represented as CBOR lists and maps
- JSON strings represented as CBOR strings
- JSON hex strings with "0x" prefix represented as CBOR byte strings
- JSON integer numbers represented as CBOR signed or unsigned numbers
- JSON maps with string keys that parse as numbers or hex byte strings, represented as CBOR map keys that are actually numbers or byte strings.
The string length limit depends on whether the hex string representation is used or not. For text strings the limit is 64 bytes for the UTF8 representation of the text string. For byte strings the limit is 64 bytes for the raw byte form (ie not the input hex, but after hex decoding).
In the "detailed schema" mapping, the idea is that we expose the full representation capability of the script data in the form of a JSON schema. This means the full representation is available and can be controlled precisely. It also means any script data can be converted into the JSON and back without loss. That is we can round-trip the script data via the JSON and also round-trip schema-compliant JSON via script data.
Constructors
| ScriptDataJsonNoSchema | Use the "no schema" mapping between JSON and script data as described above. |
| ScriptDataJsonDetailedSchema | Use the "detailed schema" mapping between JSON and script data as described above. |
Instances
| Eq ScriptDataJsonSchema Source # | |
Defined in Cardano.Api.ScriptData Methods | |
| Show ScriptDataJsonSchema Source # | |
Defined in Cardano.Api.ScriptData Methods showsPrec ∷ Int → ScriptDataJsonSchema → ShowS # show ∷ ScriptDataJsonSchema → String # showList ∷ [ScriptDataJsonSchema] → ShowS # | |
scriptDataFromJson ∷ ScriptDataJsonSchema → Value → Either ScriptDataJsonError ScriptData Source #
Convert a value from JSON into script data, using the given choice of mapping between JSON and script data.
This may fail with a conversion error if the JSON is outside the supported
subset for the chosen mapping. See ScriptDataJsonSchema for the details.
scriptDataToJson ∷ ScriptDataJsonSchema → ScriptData → Value Source #
Convert a script data value into JSON , using the given choice of mapping between JSON and script data.
This conversion is total but is not necessarily invertible.
See ScriptDataJsonSchema for the details.
data ScriptDataJsonError Source #
Constructors
| ScriptDataJsonSchemaError !Value !ScriptDataJsonSchemaError | |
| ScriptDataRangeError !Value !ScriptDataRangeError |
Instances
| Eq ScriptDataJsonError Source # | |
Defined in Cardano.Api.ScriptData Methods | |
| Show ScriptDataJsonError Source # | |
Defined in Cardano.Api.ScriptData Methods showsPrec ∷ Int → ScriptDataJsonError → ShowS # show ∷ ScriptDataJsonError → String # showList ∷ [ScriptDataJsonError] → ShowS # | |
| Error ScriptDataJsonError Source # | |
Defined in Cardano.Api.ScriptData Methods | |
data ScriptDataJsonSchemaError Source #
Constructors
Instances
| Eq ScriptDataJsonSchemaError Source # | |
Defined in Cardano.Api.ScriptData | |
| Show ScriptDataJsonSchemaError Source # | |
Defined in Cardano.Api.ScriptData Methods showsPrec ∷ Int → ScriptDataJsonSchemaError → ShowS # | |
| Error ScriptDataJsonSchemaError Source # | |
Defined in Cardano.Api.ScriptData Methods | |
Script execution units
data ExecutionUnits Source #
The units for how long a script executes for and how much memory it uses. This is used to declare the resources used by a particular use of a script.
This type is also used to describe the limits for the maximum overall execution units per transaction or per block.
Constructors
| ExecutionUnits | |
Fields
| |
Instances
| Eq ExecutionUnits Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ExecutionUnits → ExecutionUnits → Bool # (/=) ∷ ExecutionUnits → ExecutionUnits → Bool # | |
| Show ExecutionUnits Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → ExecutionUnits → ShowS # show ∷ ExecutionUnits → String # showList ∷ [ExecutionUnits] → ShowS # | |
| FromJSON ExecutionUnits Source # | |
Defined in Cardano.Api.Script | |
| ToJSON ExecutionUnits Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ ExecutionUnits → Value # toEncoding ∷ ExecutionUnits → Encoding # toJSONList ∷ [ExecutionUnits] → Value # toEncodingList ∷ [ExecutionUnits] → Encoding # | |
| FromCBOR ExecutionUnits Source # | |
Defined in Cardano.Api.Script | |
| ToCBOR ExecutionUnits Source # | |
Defined in Cardano.Api.Script Methods toCBOR ∷ ExecutionUnits → Encoding # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy ExecutionUnits → Size # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ExecutionUnits] → Size # | |
data ExecutionUnitPrices Source #
The prices for ExecutionUnits as a fraction of a Lovelace.
These are used to determine the fee for the use of a script within a
transaction, based on the ExecutionUnits needed by the use of the script.
Constructors
| ExecutionUnitPrices | |
Instances
Instances
| Eq CostModel Source # | |
| Show CostModel Source # | |
| FromJSON CostModel Source # | |
Defined in Cardano.Api.ProtocolParameters | |
| ToJSON CostModel Source # | |
Defined in Cardano.Api.ProtocolParameters Methods toEncoding ∷ CostModel → Encoding # toJSONList ∷ [CostModel] → Value # toEncodingList ∷ [CostModel] → Encoding # | |
| FromCBOR CostModel Source # | |
| ToCBOR CostModel Source # | |
validateCostModel ∷ PlutusScriptVersion lang → CostModel → Either InvalidCostModel () Source #
Script addresses
Making addresses from scripts.
data ScriptHash Source #
We have this type separate from the Hash type to avoid the script
hash type being parametrised by the era. The representation is era
independent, and there are many places where we want to use a script
hash where we don't want things to be era-parametrised.
Instances
hashScript ∷ Script lang → ScriptHash Source #
Serialisation
Support for serialising data in JSON, CBOR and text files.
CBOR
class HasTypeProxy a ⇒ SerialiseAsCBOR a Source #
Instances
Minimal complete definition
Instances
class Typeable a ⇒ FromCBOR a #
Minimal complete definition
Instances
| FromCBOR Bool | |
| FromCBOR Float | |
| FromCBOR Int | |
| FromCBOR Int32 | |
| FromCBOR Int64 | |
| FromCBOR Integer | |
| FromCBOR Natural | |
| FromCBOR Word | |
| FromCBOR Word8 | |
| FromCBOR Word16 | |
| FromCBOR Word32 | |
| FromCBOR Word64 | |
| FromCBOR () | |
| FromCBOR ByteString | |
Defined in Cardano.Binary.FromCBOR | |
| FromCBOR ShortByteString | |
Defined in Cardano.Binary.FromCBOR | |
| FromCBOR Nano | |
| FromCBOR Pico | |
| FromCBOR Void | |
| FromCBOR Text | |
| FromCBOR UTCTime | |
| FromCBOR NominalDiffTime | |
Defined in Cardano.Binary.FromCBOR | |
| FromCBOR BlockNo | |
| FromCBOR LByteString | |
| FromCBOR EpochNo | |
| FromCBOR SlotNo | |
| FromCBOR Raw | |
| FromCBOR Coin | |
| FromCBOR NonNegativeInterval | |
| FromCBOR UnitInterval | |
| FromCBOR ProtVer | |
| FromCBOR AlonzoGenesis | |
| FromCBOR Language | |
| FromCBOR CostModel | |
| FromCBOR Prices | |
| FromCBOR ExUnits | |
| FromCBOR Metadatum | |
| FromCBOR AssetName | |
| FromCBOR Likelihood | |
| FromCBOR Ptr | |
| FromCBOR Nonce | |
| FromCBOR Desirability | |
| FromCBOR StakePoolRelay | |
| FromCBOR PoolMetadata | |
| FromCBOR Network | |
| FromCBOR ValidityInterval | |
| FromCBOR ByronHash | |
| FromCBOR PositiveUnitInterval | |
| FromCBOR EpochAndSlotCount | |
| FromCBOR EpochNumber | |
| FromCBOR EpochSlots | |
Defined in Cardano.Chain.Slotting.EpochSlots | |
| FromCBOR SlotCount | |
| FromCBOR SlotNumber | |
| FromCBOR Config | |
| FromCBOR GenesisNonAvvmBalances | |
| FromCBOR GenesisDelegation | |
| FromCBOR GenesisKeyHashes | |
| FromCBOR CompactAddress | |
| FromCBOR RequiresNetworkMagic | |
| FromCBOR GenesisAvvmBalances | |
| FromCBOR ProtocolParameters | |
| FromCBOR ProtocolVersion | |
| FromCBOR ProtocolMagicId | |
| FromCBOR Certificate | |
| FromCBOR SigningKey | |
| FromCBOR SoftwareVersion | |
| FromCBOR VerificationKey | |
| FromCBOR KeyHash | |
| FromCBOR GenesisHash | |
| FromCBOR CandidateProtocolUpdate | |
| FromCBOR Endorsement | |
| FromCBOR ApplyMempoolPayloadErr | |
Defined in Cardano.Chain.Byron.API.Mempool | |
| FromCBOR Tx | |
| FromCBOR Proposal | |
| FromCBOR Vote | |
| FromCBOR ChainValidationState | |
| FromCBOR Map | |
| FromCBOR ScheduledDelegation | |
| FromCBOR State | |
| FromCBOR UTxO | |
| FromCBOR Error | |
| FromCBOR ToSign | |
| FromCBOR CompactRedeemVerificationKey | |
| FromCBOR Lovelace | |
| FromCBOR SystemStart | |
Defined in Cardano.Slotting.Time | |
| FromCBOR Point | |
| FromCBOR Proof | |
| FromCBOR SignKey | |
| FromCBOR VerKey | |
| FromCBOR RedeemVerificationKey | |
| FromCBOR RedeemSigningKey | |
| FromCBOR IsValidating | |
| FromCBOR Tag | |
| FromCBOR ChainDifficulty | |
| FromCBOR Proof | |
| FromCBOR SscPayload | |
| FromCBOR ProposalBody | |
| FromCBOR TxInWitness | |
| FromCBOR Body | |
| FromCBOR TxPayload | |
| FromCBOR Payload | |
| FromCBOR Payload | |
| FromCBOR BlockSignature | |
| FromCBOR TxProof | |
| FromCBOR SscProof | |
| FromCBOR CompactTxIn | |
| FromCBOR CompactTxOut | |
| FromCBOR State | |
| FromCBOR UTxOValidationError | |
| FromCBOR BlockCount | |
| FromCBOR UTxOConfiguration | |
| FromCBOR ApplicationName | |
| FromCBOR ApplicationVersion | |
| FromCBOR ProtocolUpdateProposal | |
| FromCBOR SoftwareUpdateProposal | |
| FromCBOR Error | |
| FromCBOR HDAddressPayload | |
| FromCBOR NetworkMagic | |
| FromCBOR AddrSpendingData | |
| FromCBOR AddrType | |
| FromCBOR Address | |
| FromCBOR Address' | |
| FromCBOR LovelaceError | |
| FromCBOR LovelacePortion | |
| FromCBOR TxFeePolicy | |
| FromCBOR TxSizeLinear | |
| FromCBOR State | |
| FromCBOR State | |
| FromCBOR GenesisData | |
| FromCBOR CompactTxId | |
| FromCBOR TxIn | |
| FromCBOR TxOut | |
| FromCBOR TxAux | |
| FromCBOR TxSigData | |
| FromCBOR UTxOError | |
| FromCBOR ApplicationNameError | |
| FromCBOR InstallerHash | |
| FromCBOR SystemTag | |
| FromCBOR ProtocolParametersUpdate | |
| FromCBOR SoftforkRule | |
| FromCBOR SoftwareVersionError | |
| FromCBOR SystemTagError | |
| FromCBOR Error | |
| FromCBOR Error | |
| FromCBOR Error | |
| FromCBOR Adopted | |
| FromCBOR ActiveSlotCoeff | |
| FromCBOR DnsName | |
| FromCBOR Port | |
| FromCBOR PositiveInterval | |
| FromCBOR Url | |
| FromCBOR DeltaCoin | |
| FromCBOR TicknState | |
| FromCBOR ChainCode | |
| FromCBOR AccountState | |
| FromCBOR LogWeight | |
| FromCBOR MIRPot | |
| FromCBOR KESPeriod | |
| FromCBOR PerformanceEstimate | |
| FromCBOR RewardType | |
| FromCBOR VotingPeriod | |
| FromCBOR TxValidationError | |
| FromCBOR ExecutionUnits Source # | |
Defined in Cardano.Api.Script | |
| FromCBOR AnyPlutusScriptVersion Source # | |
Defined in Cardano.Api.Script | |
| FromCBOR Lovelace Source # | |
| FromCBOR UpdateProposal Source # | |
Defined in Cardano.Api.ProtocolParameters | |
| FromCBOR CostModel Source # | |
| FromCBOR ExecutionUnitPrices Source # | |
Defined in Cardano.Api.ProtocolParameters | |
| FromCBOR PraosNonce Source # | |
Defined in Cardano.Api.ProtocolParameters | |
| FromCBOR ProtocolParametersUpdate Source # | |
Defined in Cardano.Api.ProtocolParameters Methods fromCBOR ∷ Decoder s ProtocolParametersUpdate # | |
| FromCBOR Certificate Source # | |
Defined in Cardano.Api.Certificate | |
| FromCBOR OperationalCertificateIssueCounter Source # | |
Defined in Cardano.Api.OperationalCertificate Methods fromCBOR ∷ Decoder s OperationalCertificateIssueCounter # | |
| FromCBOR OperationalCertificate Source # | |
Defined in Cardano.Api.OperationalCertificate | |
| FromCBOR a ⇒ FromCBOR [a] | |
| FromCBOR a ⇒ FromCBOR (Maybe a) | |
| (Integral a, FromCBOR a) ⇒ FromCBOR (Ratio a) | |
| (Ord a, FromCBOR a) ⇒ FromCBOR (Set a) | |
| FromCBOR a ⇒ FromCBOR (NonEmpty a) | |
| (Serialise t, Typeable t) ⇒ FromCBOR (WithOrigin t) | |
| FromCBOR a ⇒ FromCBOR (Vector a) | |
| (Era era, Ord (Script era), FromCBOR (Annotator (Script era)), Script era ~ Script era) ⇒ FromCBOR (Annotator (AuxiliaryData era)) | |
| (FromCBOR (Annotator (AuxiliaryData era)), FromCBOR (Annotator (Script era)), FromCBOR (Annotator (TxBody era)), FromCBOR (Annotator (Witnesses era)), ToCBOR (AuxiliaryData era), ToCBOR (Script era), ToCBOR (TxBody era), ToCBOR (Witnesses era), ValidateScript era, Script era ~ Script era, Era era) ⇒ FromCBOR (Annotator (TxSeq era)) | |
| (Era era, ValidateScript era, Script era ~ Script era) ⇒ FromCBOR (Annotator (TxWitness era)) | |
| (Typeable t, FromCBOR (Annotator t)) ⇒ FromCBOR (Annotator (MemoBytes t)) | |
| (Era era, ToCBOR (Data era), ToCBOR (Script era), Typeable (Script era), ValidateScript era, Script era ~ Script era) ⇒ FromCBOR (Annotator (TxWitnessRaw era)) | |
| (Typeable era, FromCBOR (Annotator (Script era)), ValidateScript era) ⇒ FromCBOR (Annotator (WitnessSetHKD Identity era)) | |
| (BlockAnn era, Typeable era) ⇒ FromCBOR (Annotator (TxSeq era)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (Timelock crypto)) | |
| (Era era, FromCBOR (Annotator (TxBody era)), FromCBOR (Annotator (AuxiliaryData era)), FromCBOR (Annotator (Witnesses era))) ⇒ FromCBOR (Annotator (Tx era)) | |
| (Era era, FromCBOR (TxOut era), FromCBOR (PParamsDelta era), ToCBOR (PParamsDelta era)) ⇒ FromCBOR (Annotator (TxBody era)) | |
| (Era era, FromCBOR (Annotator (TxBody era)), FromCBOR (Annotator (AuxiliaryData era)), FromCBOR (Annotator (Witnesses era))) ⇒ FromCBOR (Annotator (TxRaw era)) | |
| FamsFrom era ⇒ FromCBOR (Annotator (TxBodyRaw era)) | |
| (Era era, Typeable (Script era), Typeable (AuxiliaryData era), Compactible (Value era), Show (Value era), DecodeNonNegative (Value era), FromCBOR (Annotator (Script era)), SerialisableData (PParamsDelta era)) ⇒ FromCBOR (Annotator (TxBody era)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (MultiSig crypto)) | |
| Typeable era ⇒ FromCBOR (Annotator (Metadata era)) | |
| (Era era, AnnotatedData (Script era)) ⇒ FromCBOR (Annotator (AuxiliaryData era)) | |
| FamsFrom era ⇒ FromCBOR (Annotator (TxBody era)) | |
| (Crypto (Crypto era), Typeable (Crypto era), Typeable era) ⇒ FromCBOR (Annotator (Script era)) | |
| Typeable era ⇒ FromCBOR (Annotator (Data era)) | |
| (Era era, Ord (Script era), FromCBOR (Annotator (Script era)), Script era ~ Script era) ⇒ FromCBOR (Annotator (AuxiliaryDataRaw era)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (TimelockRaw crypto)) | |
| (Era era, AnnotatedData (Script era)) ⇒ FromCBOR (Annotator (AuxiliaryDataRaw era)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (BHeader crypto)) | |
| (BlockAnn era, ValidateScript era, SupportsSegWit era, FromCBOR (Annotator (TxSeq era))) ⇒ FromCBOR (Annotator (Block era)) | |
| (Typeable kr, Crypto crypto) ⇒ FromCBOR (Annotator (WitVKey kr crypto)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (BootstrapWitness crypto)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (MultiSigRaw crypto)) | |
| Era era ⇒ FromCBOR (Annotator (TxDats era)) | |
| Era era ⇒ FromCBOR (Annotator (Redeemers era)) | |
| Era era ⇒ FromCBOR (Annotator (RedeemersRaw era)) | |
| ShelleyBasedEra era ⇒ FromCBOR (Annotator (Header (ShelleyBlock era))) | |
| ShelleyBasedEra era ⇒ FromCBOR (Annotator (ShelleyBlock era)) | |
| (Typeable era, Era era) ⇒ FromCBOR (Annotator (TxDatsRaw era)) | |
| (Era era, Typeable (Script era), Typeable (AuxiliaryData era), Compactible (Value era), Show (Value era), DecodeNonNegative (Value era), FromCBOR (Annotator (Script era)), FromCBOR (PParamsDelta era), ToCBOR (PParamsDelta era)) ⇒ FromCBOR (Annotator (TxBodyRaw era)) | |
| (Era era, BlockAnn era, ValidateScript era, TxSeq era ~ TxSeq era) ⇒ FromCBOR (Annotator (LaxBlock era)) | |
| (TransTxBody FromCBOR era, ToCBOR (PParamsDelta era), Era era) ⇒ FromCBOR (Annotator (TxBodyRaw era)) | |
| FromCBOR (SigDSIGN Ed25519Bip32DSIGN) Source # | |
Defined in Cardano.Api.Crypto.Ed25519Bip32 Methods fromCBOR ∷ Decoder s (SigDSIGN Ed25519Bip32DSIGN) # | |
| FromCBOR (SigDSIGN Ed25519DSIGN) | |
| FromCBOR (SigDSIGN MockDSIGN) | |
| FromCBOR (SigDSIGN Ed448DSIGN) | |
| FromCBOR (SignKeyDSIGN Ed25519Bip32DSIGN) Source # | |
Defined in Cardano.Api.Crypto.Ed25519Bip32 Methods fromCBOR ∷ Decoder s (SignKeyDSIGN Ed25519Bip32DSIGN) # label ∷ Proxy (SignKeyDSIGN Ed25519Bip32DSIGN) → Text # | |
| FromCBOR (SignKeyDSIGN Ed25519DSIGN) | |
Defined in Cardano.Crypto.DSIGN.Ed25519 Methods fromCBOR ∷ Decoder s (SignKeyDSIGN Ed25519DSIGN) # label ∷ Proxy (SignKeyDSIGN Ed25519DSIGN) → Text # | |
| FromCBOR (SignKeyDSIGN MockDSIGN) | |
Defined in Cardano.Crypto.DSIGN.Mock Methods fromCBOR ∷ Decoder s (SignKeyDSIGN MockDSIGN) # label ∷ Proxy (SignKeyDSIGN MockDSIGN) → Text # | |
| FromCBOR (SignKeyDSIGN Ed448DSIGN) | |
Defined in Cardano.Crypto.DSIGN.Ed448 Methods fromCBOR ∷ Decoder s (SignKeyDSIGN Ed448DSIGN) # label ∷ Proxy (SignKeyDSIGN Ed448DSIGN) → Text # | |
| FromCBOR (VerKeyDSIGN Ed25519Bip32DSIGN) Source # | |
Defined in Cardano.Api.Crypto.Ed25519Bip32 Methods fromCBOR ∷ Decoder s (VerKeyDSIGN Ed25519Bip32DSIGN) # label ∷ Proxy (VerKeyDSIGN Ed25519Bip32DSIGN) → Text # | |
| FromCBOR (VerKeyDSIGN Ed25519DSIGN) | |
Defined in Cardano.Crypto.DSIGN.Ed25519 Methods fromCBOR ∷ Decoder s (VerKeyDSIGN Ed25519DSIGN) # label ∷ Proxy (VerKeyDSIGN Ed25519DSIGN) → Text # | |
| FromCBOR (VerKeyDSIGN MockDSIGN) | |
Defined in Cardano.Crypto.DSIGN.Mock | |
| FromCBOR (VerKeyDSIGN Ed448DSIGN) | |
Defined in Cardano.Crypto.DSIGN.Ed448 Methods fromCBOR ∷ Decoder s (VerKeyDSIGN Ed448DSIGN) # label ∷ Proxy (VerKeyDSIGN Ed448DSIGN) → Text # | |
| Crypto crypto ⇒ FromCBOR (ScriptHash crypto) | |
| FromCBOR a ⇒ FromCBOR (StrictMaybe a) | |
| Crypto crypto ⇒ FromCBOR (AuxiliaryDataHash crypto) | |
| (Era era, FromCBOR (PParamsDelta era)) ⇒ FromCBOR (PPUPState era) | |
| Crypto crypto ⇒ FromCBOR (Value crypto) | |
| Era era ⇒ FromCBOR (PParamsUpdate era) | |
| Era era ⇒ FromCBOR (PParams era) | |
| (Era era, TransTxOut DecodeNonNegative era, Show (Value era)) ⇒ FromCBOR (TxOut era) | |
| Era era ⇒ FromCBOR (PParams era) | |
| Era era ⇒ FromCBOR (PParamsUpdate era) | |
| FamsFrom era ⇒ FromCBOR (TxBodyRaw era) | |
| (FromCBOR (PParams era), TransValue FromCBOR era, HashAnnotated (TxBody era) EraIndependentTxBody (Crypto era), FromCBOR (TxOut era), FromCBOR (State (EraRule "PPUP" era)), Era era) ⇒ FromCBOR (EpochState era) | |
| (Era era, HashAnnotated (TxBody era) EraIndependentTxBody (Crypto era), FromCBOR (TxOut era), FromCBOR (Value era), FromCBOR (State (EraRule "PPUP" era))) ⇒ FromCBOR (LedgerState era) | |
| (TransValue FromCBOR era, FromCBOR (State (EraRule "PPUP" era)), FromCBOR (TxOut era), HashAnnotated (TxBody era) EraIndependentTxBody (Crypto era)) ⇒ FromCBOR (UTxOState era) | |
| Crypto crypto ⇒ FromCBOR (DPState crypto) | |
| (Era era, FromCBOR (PParams era), FromCBOR (TxOut era), FromCBOR (Value era), FromCBOR (State (EraRule "PPUP" era))) ⇒ FromCBOR (NewEpochState era) | |
| Crypto crypto ⇒ FromCBOR (Addr crypto) | |
| Crypto crypto ⇒ FromCBOR (BlocksMade crypto) | |
| Crypto crypto ⇒ FromCBOR (SnapShots crypto) | |
| Crypto crypto ⇒ FromCBOR (NonMyopic crypto) | |
| Crypto crypto ⇒ FromCBOR (PulsingRewUpdate crypto) | |
| Crypto crypto ⇒ FromCBOR (PoolDistr crypto) | |
| (Era era, FromCBOR (PParamsDelta era)) ⇒ FromCBOR (ProposedPPUpdates era) | |
| Era era ⇒ FromCBOR (ShelleyGenesis era) | |
Defined in Shelley.Spec.Ledger.Genesis | |
| Crypto crypto ⇒ FromCBOR (GenDelegPair crypto) | |
| Crypto crypto ⇒ FromCBOR (ShelleyGenesisStaking crypto) | |
| FromCBOR (CompactForm Coin) | |
| Crypto crypto ⇒ FromCBOR (CompactForm (Value crypto)) | |
| (FromCBOR (TxOut era), Era era) ⇒ FromCBOR (UTxO era) | |
| (Era era, FromCBOR (PParamsDelta era)) ⇒ FromCBOR (Update era) | |
| Crypto crypto ⇒ FromCBOR (TxIn crypto) | |
| (Era era, DecodeNonNegative (Value era), Show (Value era), Compactible (Value era)) ⇒ FromCBOR (TxOut era) | |
| Crypto crypto ⇒ FromCBOR (PolicyID crypto) | |
| (ShelleyBased era, FromCBOR (PredicateFailure (EraRule "LEDGER" era))) ⇒ FromCBOR (ApplyTxError era) | |
| (FromCBOR (PredicateFailure (EraRule "DELEGS" era)), FromCBOR (PredicateFailure (EraRule "UTXOW" era)), Era era) ⇒ FromCBOR (LedgerPredicateFailure era) | |
| (Era era, FromCBOR (PredicateFailure (EraRule "DELPL" era)), Typeable (Script era)) ⇒ FromCBOR (DelegsPredicateFailure era) | |
| (Era era, FromCBOR (PredicateFailure (EraRule "POOL" era)), FromCBOR (PredicateFailure (EraRule "DELEG" era)), Typeable (Script era)) ⇒ FromCBOR (DelplPredicateFailure era) | |
| Crypto crypto ⇒ FromCBOR (DCert crypto) | |
| Crypto crypto ⇒ FromCBOR (Wdrl crypto) | |
| Crypto crypto ⇒ FromCBOR (PState crypto) | |
| Crypto crypto ⇒ FromCBOR (PoolParams crypto) | |
| Crypto crypto ⇒ FromCBOR (InstantaneousRewards crypto) | |
| Crypto crypto ⇒ FromCBOR (SnapShot crypto) | |
| Crypto crypto ⇒ FromCBOR (ChainDepState crypto) | |
| Crypto crypto ⇒ FromCBOR (FutureGenDeleg crypto) | |
| Crypto crypto ⇒ FromCBOR (DState crypto) | |
| Crypto crypto ⇒ FromCBOR (IndividualPoolStake crypto) | |
| (TransValue FromCBOR era, TransUTxO FromCBOR era, DecodeNonNegative (Value era), Show (Value era), FromCBOR (PredicateFailure (EraRule "PPUP" era))) ⇒ FromCBOR (UtxoPredicateFailure era) | |
| (Era era, FromCBOR (PredicateFailure (EraRule "UTXO" era)), Typeable (Script era), Typeable (AuxiliaryData era)) ⇒ FromCBOR (UtxowPredicateFailure era) | |
| Crypto crypto ⇒ FromCBOR (RewardProvenance crypto) | |
| Crypto crypto ⇒ FromCBOR (RewardProvenancePool crypto) | |
| Crypto crypto ⇒ FromCBOR (RewardAcnt crypto) | |
| Crypto crypto ⇒ FromCBOR (TxId crypto) | |
| DSIGNAlgorithm d ⇒ FromCBOR (SigKES (SingleKES d)) | |
| (KESAlgorithm d, HashAlgorithm h, Typeable d) ⇒ FromCBOR (SigKES (SumKES h d)) | |
| KnownNat t ⇒ FromCBOR (SigKES (MockKES t)) | |
| (DSIGNAlgorithm d, Typeable d, KnownNat t, KnownNat (SeedSizeDSIGN d * t)) ⇒ FromCBOR (SigKES (SimpleKES d t)) | |
| DSIGNAlgorithm d ⇒ FromCBOR (VerKeyKES (SingleKES d)) | |
| (KESAlgorithm d, HashAlgorithm h, Typeable d) ⇒ FromCBOR (VerKeyKES (SumKES h d)) | |
| KnownNat t ⇒ FromCBOR (VerKeyKES (MockKES t)) | |
| (DSIGNAlgorithm d, Typeable d, KnownNat t, KnownNat (SeedSizeDSIGN d * t)) ⇒ FromCBOR (VerKeyKES (SimpleKES d t)) | |
| DSIGNAlgorithm d ⇒ FromCBOR (SignKeyKES (SingleKES d)) | |
| (KESAlgorithm d, HashAlgorithm h, Typeable d) ⇒ FromCBOR (SignKeyKES (SumKES h d)) | |
| KnownNat t ⇒ FromCBOR (SignKeyKES (MockKES t)) | |
| (DSIGNAlgorithm d, Typeable d, KnownNat t, KnownNat (SeedSizeDSIGN d * t)) ⇒ FromCBOR (SignKeyKES (SimpleKES d t)) | |
| Crypto crypto ⇒ FromCBOR (CompactAddr crypto) | |
| FromCBOR (Hash StakePoolKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (Hash GenesisUTxOKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (Hash GenesisDelegateExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (Hash GenesisDelegateExtendedKey) # | |
| FromCBOR (Hash GenesisDelegateKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (Hash GenesisDelegateKey) # | |
| FromCBOR (Hash GenesisExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (Hash GenesisExtendedKey) # | |
| FromCBOR (Hash GenesisKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (Hash StakeExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (Hash StakeKey) Source # | |
| FromCBOR (Hash PaymentExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (Hash PaymentExtendedKey) # | |
| FromCBOR (Hash PaymentKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (Hash ByronKeyLegacy) Source # | |
Defined in Cardano.Api.KeysByron | |
| FromCBOR (Hash ByronKey) Source # | |
| FromCBOR (Hash VrfKey) Source # | |
| FromCBOR (Hash KesKey) Source # | |
| Crypto c ⇒ FromCBOR (ShelleyHash c) | |
| Era era ⇒ FromCBOR (CompactGenesis era) | |
| FromCBOR (ATxAux ByteSpan) | |
| FromCBOR (ACertificate ByteSpan) | |
| FromCBOR (AProposal ByteSpan) | |
| FromCBOR (AVote ByteSpan) | |
| Crypto crypto ⇒ FromCBOR (BHBody crypto) | |
| Crypto crypto ⇒ FromCBOR (PrevHash crypto) | |
| Crypto crypto ⇒ FromCBOR (HashHeader crypto) | |
| Crypto crypto ⇒ FromCBOR (PrtclState crypto) | |
| Typeable v ⇒ FromCBOR (OutputVRF v) | |
| FromCBOR (CertVRF PraosVRF) | |
| FromCBOR (CertVRF MockVRF) | |
| FromCBOR (CertVRF SimpleVRF) | |
| FromCBOR (SignKeyVRF PraosVRF) | |
| FromCBOR (SignKeyVRF MockVRF) | |
| FromCBOR (SignKeyVRF SimpleVRF) | |
| FromCBOR (VerKeyVRF PraosVRF) | |
| FromCBOR (VerKeyVRF MockVRF) | |
| FromCBOR (VerKeyVRF SimpleVRF) | |
| Typeable a ⇒ FromCBOR (RedeemSignature a) | |
| Typeable a ⇒ FromCBOR (Signature a) | |
| Typeable era ⇒ FromCBOR (LangDepView era) | |
| Crypto crypto ⇒ FromCBOR (CollectError crypto) | |
| (Typeable c, Crypto c) ⇒ FromCBOR (ScriptPurpose c) | |
| (Typeable era, FromCBOR (BbodyPredicateFailure era)) ⇒ FromCBOR (AlonzoBbodyPredFail era) | |
| (Era era, FromCBOR (PredicateFailure (EraRule "UTXO" era)), Typeable (Script era), Typeable (AuxiliaryData era)) ⇒ FromCBOR (AlonzoPredFail era) | |
| Crypto crypto ⇒ FromCBOR (GenDelegs crypto) | |
| (Era era, FromCBOR (TxOut era), FromCBOR (Value era), FromCBOR (PredicateFailure (EraRule "UTXOS" era))) ⇒ FromCBOR (UtxoPredicateFailure era) | |
| (Era era, FromCBOR (PredicateFailure (EraRule "PPUP" era))) ⇒ FromCBOR (UtxosPredicateFailure era) | |
| Era era ⇒ FromCBOR (PpupPredicateFailure era) | |
| (Era era, Typeable (Script era), Typeable (AuxiliaryData era), Compactible (Value era), Show (Value era), DecodeNonNegative (Value era), FromCBOR (Annotator (Script era)), FromCBOR (PParamsDelta era), ToCBOR (PParamsDelta era)) ⇒ FromCBOR (TxBodyRaw era) | |
| FromCBOR (ABody ByteSpan) | |
| FromCBOR (APayload ByteSpan) | |
| FromCBOR (ABlockSignature ByteSpan) | |
| FromCBOR (ATxPayload ByteSpan) | |
| FromCBOR (APayload ByteSpan) | |
| FromCBOR (Attributes ()) | |
| FromCBOR (Attributes AddrAttributes) | |
| FromCBOR a ⇒ FromCBOR (MerkleRoot a) | |
| (FromCBOR a, ToCBOR a) ⇒ FromCBOR (MerkleTree a) | |
| FromCBOR n ⇒ FromCBOR (TooLarge n) | |
| (FromCBORGroup a, ToCBORGroup a) ⇒ FromCBOR (CBORGroup a) | |
| Crypto crypto ⇒ FromCBOR (CompactValue crypto) | |
| Crypto crypto ⇒ FromCBOR (LastAppliedBlock crypto) | |
| Crypto crypto ⇒ FromCBOR (MIRCert crypto) | |
| Crypto crypto ⇒ FromCBOR (StakeCreds crypto) | |
| Crypto crypto ⇒ FromCBOR (Stake crypto) | |
| Crypto crypto ⇒ FromCBOR (RewardSnapShot crypto) | |
| Crypto crypto ⇒ FromCBOR (RewardUpdate crypto) | |
| Crypto c ⇒ FromCBOR (RewardAns c) | |
| Crypto c ⇒ FromCBOR (Pulser c) | |
| Crypto crypto ⇒ FromCBOR (OBftSlot crypto) | |
| Crypto crypto ⇒ FromCBOR (FreeVars crypto) | |
| Crypto crypto ⇒ FromCBOR (Reward crypto) | |
| (Era era, Typeable (Script era)) ⇒ FromCBOR (DelegPredicateFailure era) | |
| Era era ⇒ FromCBOR (PoolPredicateFailure era) | |
| (ShelleyBased era, FromCBOR (PredicateFailure (EraRule "LEDGER" era))) ⇒ FromCBOR (LedgersPredicateFailure era) | |
| (TransValue FromCBOR era, TransUTxO FromCBOR era, DecodeNonNegative (Value era), Show (Value era), FromCBOR (PredicateFailure (EraRule "PPUP" era))) ⇒ FromCBOR (UtxoPredicateFailure era) | |
| Crypto crypto ⇒ FromCBOR (MIRTarget crypto) | |
| (FromCBOR (TxOut era), Era era, FromCBOR (PParamsDelta era), ToCBOR (PParamsDelta era)) ⇒ FromCBOR (TxBodyRaw era) | |
| FromCBOR a ⇒ FromCBOR (CborSeq a) | |
| FromCBOR (VerificationKey StakePoolKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey StakePoolKey) # label ∷ Proxy (VerificationKey StakePoolKey) → Text # | |
| FromCBOR (VerificationKey GenesisUTxOKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisUTxOKey) # label ∷ Proxy (VerificationKey GenesisUTxOKey) → Text # | |
| FromCBOR (VerificationKey GenesisDelegateExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisDelegateExtendedKey) # label ∷ Proxy (VerificationKey GenesisDelegateExtendedKey) → Text # | |
| FromCBOR (VerificationKey GenesisDelegateKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisDelegateKey) # | |
| FromCBOR (VerificationKey GenesisExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisExtendedKey) # | |
| FromCBOR (VerificationKey GenesisKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisKey) # label ∷ Proxy (VerificationKey GenesisKey) → Text # | |
| FromCBOR (VerificationKey StakeExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey StakeExtendedKey) # | |
| FromCBOR (VerificationKey StakeKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey StakeKey) # | |
| FromCBOR (VerificationKey PaymentExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey PaymentExtendedKey) # | |
| FromCBOR (VerificationKey PaymentKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey PaymentKey) # label ∷ Proxy (VerificationKey PaymentKey) → Text # | |
| FromCBOR (VerificationKey ByronKeyLegacy) Source # | |
Defined in Cardano.Api.KeysByron Methods fromCBOR ∷ Decoder s (VerificationKey ByronKeyLegacy) # label ∷ Proxy (VerificationKey ByronKeyLegacy) → Text # | |
| FromCBOR (VerificationKey ByronKey) Source # | |
Defined in Cardano.Api.KeysByron Methods fromCBOR ∷ Decoder s (VerificationKey ByronKey) # | |
| FromCBOR (VerificationKey VrfKey) Source # | |
Defined in Cardano.Api.KeysPraos Methods fromCBOR ∷ Decoder s (VerificationKey VrfKey) # | |
| FromCBOR (VerificationKey KesKey) Source # | |
Defined in Cardano.Api.KeysPraos Methods fromCBOR ∷ Decoder s (VerificationKey KesKey) # | |
| FromCBOR (SigningKey StakePoolKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey StakePoolKey) # label ∷ Proxy (SigningKey StakePoolKey) → Text # | |
| FromCBOR (SigningKey GenesisUTxOKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey GenesisUTxOKey) # label ∷ Proxy (SigningKey GenesisUTxOKey) → Text # | |
| FromCBOR (SigningKey GenesisDelegateExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey GenesisDelegateExtendedKey) # label ∷ Proxy (SigningKey GenesisDelegateExtendedKey) → Text # | |
| FromCBOR (SigningKey GenesisDelegateKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey GenesisDelegateKey) # label ∷ Proxy (SigningKey GenesisDelegateKey) → Text # | |
| FromCBOR (SigningKey GenesisExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey GenesisExtendedKey) # label ∷ Proxy (SigningKey GenesisExtendedKey) → Text # | |
| FromCBOR (SigningKey GenesisKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (SigningKey StakeExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey StakeExtendedKey) # label ∷ Proxy (SigningKey StakeExtendedKey) → Text # | |
| FromCBOR (SigningKey StakeKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (SigningKey PaymentExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey PaymentExtendedKey) # label ∷ Proxy (SigningKey PaymentExtendedKey) → Text # | |
| FromCBOR (SigningKey PaymentKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (SigningKey ByronKeyLegacy) Source # | |
Defined in Cardano.Api.KeysByron Methods fromCBOR ∷ Decoder s (SigningKey ByronKeyLegacy) # label ∷ Proxy (SigningKey ByronKeyLegacy) → Text # | |
| FromCBOR (SigningKey ByronKey) Source # | |
Defined in Cardano.Api.KeysByron | |
| FromCBOR (SigningKey VrfKey) Source # | |
Defined in Cardano.Api.KeysPraos | |
| FromCBOR (SigningKey KesKey) Source # | |
Defined in Cardano.Api.KeysPraos | |
| (SerialiseAsRawBytes a, Typeable a) ⇒ FromCBOR (UsingRawBytes a) Source # | |
Defined in Cardano.Api.SerialiseUsing | |
| (Typeable lang, HasTypeProxy lang) ⇒ FromCBOR (PlutusScript lang) Source # | |
Defined in Cardano.Api.Script | |
| (Typeable era, TransLedgerState FromCBOR (ShelleyLedgerEra era)) ⇒ FromCBOR (DebugLedgerState era) Source # | |
Defined in Cardano.Api.Query | |
| (FromCBOR a, FromCBOR b) ⇒ FromCBOR (Either a b) | |
| (FromCBOR a, FromCBOR b) ⇒ FromCBOR (a, b) | |
| (Ord k, FromCBOR k, FromCBOR v) ⇒ FromCBOR (Map k v) | |
| (HashAlgorithm h, Typeable a) ⇒ FromCBOR (Hash h a) | |
| (Crypto crypto, Typeable disc) ⇒ FromCBOR (KeyHash disc crypto) | |
| (Typeable index, Crypto c) ⇒ FromCBOR (SafeHash c index) | |
| (Typeable kr, Crypto crypto) ⇒ FromCBOR (Credential kr crypto) | |
| (Typeable algo, Typeable a, HashAlgorithm algo) ⇒ FromCBOR (AbstractHash algo a) | |
| (Crypto crypto, Typeable kd) ⇒ FromCBOR (VKey kd crypto) | |
| (VRFAlgorithm v, Typeable a) ⇒ FromCBOR (CertifiedVRF v a) | |
| (FromCBOR a, Bounded (BoundedRatio b a), Bounded a, Integral a, Typeable b, Typeable a, Show a) ⇒ FromCBOR (BoundedRatio b a) | |
| (FromCBOR a, FromCBOR b, FromCBOR c) ⇒ FromCBOR (a, b, c) | |
| (Typeable s, FromCBOR a) ⇒ FromCBOR (Tagged s a) | |
| (Ord a, Ord b, FromCBOR a, FromCBOR b) ⇒ FromCBOR (BiMap b a b) | |
| (FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d) ⇒ FromCBOR (a, b, c, d) | |
| (FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d, FromCBOR e) ⇒ FromCBOR (a, b, c, d, e) | |
| (FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d, FromCBOR e, FromCBOR f, FromCBOR g) ⇒ FromCBOR (a, b, c, d, e, f, g) | |
serialiseToCBOR ∷ SerialiseAsCBOR a ⇒ a → ByteString Source #
deserialiseFromCBOR ∷ SerialiseAsCBOR a ⇒ AsType a → ByteString → Either DecoderError a Source #
JSON
Instances
| ToJSON Bool | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Bool → Encoding # toJSONList ∷ [Bool] → Value # toEncodingList ∷ [Bool] → Encoding # | |
| ToJSON Char | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Char → Encoding # toJSONList ∷ [Char] → Value # toEncodingList ∷ [Char] → Encoding # | |
| ToJSON Double | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Double → Encoding # toJSONList ∷ [Double] → Value # toEncodingList ∷ [Double] → Encoding # | |
| ToJSON Float | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Float → Encoding # toJSONList ∷ [Float] → Value # toEncodingList ∷ [Float] → Encoding # | |
| ToJSON Int | |
Defined in Data.Aeson.Types.ToJSON | |
| ToJSON Int8 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Int8 → Encoding # toJSONList ∷ [Int8] → Value # toEncodingList ∷ [Int8] → Encoding # | |
| ToJSON Int16 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Int16 → Encoding # toJSONList ∷ [Int16] → Value # toEncodingList ∷ [Int16] → Encoding # | |
| ToJSON Int32 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Int32 → Encoding # toJSONList ∷ [Int32] → Value # toEncodingList ∷ [Int32] → Encoding # | |
| ToJSON Int64 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Int64 → Encoding # toJSONList ∷ [Int64] → Value # toEncodingList ∷ [Int64] → Encoding # | |
| ToJSON Integer | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Integer → Encoding # toJSONList ∷ [Integer] → Value # toEncodingList ∷ [Integer] → Encoding # | |
| ToJSON Natural | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Natural → Encoding # toJSONList ∷ [Natural] → Value # toEncodingList ∷ [Natural] → Encoding # | |
| ToJSON Ordering | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Ordering → Encoding # toJSONList ∷ [Ordering] → Value # toEncodingList ∷ [Ordering] → Encoding # | |
| ToJSON Word | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word → Encoding # toJSONList ∷ [Word] → Value # toEncodingList ∷ [Word] → Encoding # | |
| ToJSON Word8 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word8 → Encoding # toJSONList ∷ [Word8] → Value # toEncodingList ∷ [Word8] → Encoding # | |
| ToJSON Word16 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word16 → Encoding # toJSONList ∷ [Word16] → Value # toEncodingList ∷ [Word16] → Encoding # | |
| ToJSON Word32 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word32 → Encoding # toJSONList ∷ [Word32] → Value # toEncodingList ∷ [Word32] → Encoding # | |
| ToJSON Word64 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word64 → Encoding # toJSONList ∷ [Word64] → Value # toEncodingList ∷ [Word64] → Encoding # | |
| ToJSON () | |
Defined in Data.Aeson.Types.ToJSON | |
| ToJSON Version | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Version → Encoding # toJSONList ∷ [Version] → Value # toEncodingList ∷ [Version] → Encoding # | |
| ToJSON Void | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Void → Encoding # toJSONList ∷ [Void] → Value # toEncodingList ∷ [Void] → Encoding # | |
| ToJSON CTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ CTime → Encoding # toJSONList ∷ [CTime] → Value # toEncodingList ∷ [CTime] → Encoding # | |
| ToJSON IntSet | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ IntSet → Encoding # toJSONList ∷ [IntSet] → Value # toEncodingList ∷ [IntSet] → Encoding # | |
| ToJSON Text | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Text → Encoding # toJSONList ∷ [Text] → Value # toEncodingList ∷ [Text] → Encoding # | |
| ToJSON Text | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Text → Encoding # toJSONList ∷ [Text] → Value # toEncodingList ∷ [Text] → Encoding # | |
| ToJSON ZonedTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ ZonedTime → Encoding # toJSONList ∷ [ZonedTime] → Value # toEncodingList ∷ [ZonedTime] → Encoding # | |
| ToJSON LocalTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ LocalTime → Encoding # toJSONList ∷ [LocalTime] → Value # toEncodingList ∷ [LocalTime] → Encoding # | |
| ToJSON TimeOfDay | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ TimeOfDay → Encoding # toJSONList ∷ [TimeOfDay] → Value # toEncodingList ∷ [TimeOfDay] → Encoding # | |
| ToJSON CalendarDiffTime | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ CalendarDiffTime → Value # toEncoding ∷ CalendarDiffTime → Encoding # toJSONList ∷ [CalendarDiffTime] → Value # toEncodingList ∷ [CalendarDiffTime] → Encoding # | |
| ToJSON UTCTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ UTCTime → Encoding # toJSONList ∷ [UTCTime] → Value # toEncodingList ∷ [UTCTime] → Encoding # | |
| ToJSON SystemTime | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ SystemTime → Value # toEncoding ∷ SystemTime → Encoding # toJSONList ∷ [SystemTime] → Value # toEncodingList ∷ [SystemTime] → Encoding # | |
| ToJSON NominalDiffTime | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ NominalDiffTime → Value # toEncoding ∷ NominalDiffTime → Encoding # toJSONList ∷ [NominalDiffTime] → Value # toEncodingList ∷ [NominalDiffTime] → Encoding # | |
| ToJSON DiffTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ DiffTime → Encoding # toJSONList ∷ [DiffTime] → Value # toEncodingList ∷ [DiffTime] → Encoding # | |
| ToJSON DayOfWeek | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ DayOfWeek → Encoding # toJSONList ∷ [DayOfWeek] → Value # toEncodingList ∷ [DayOfWeek] → Encoding # | |
| ToJSON Day | |
Defined in Data.Aeson.Types.ToJSON | |
| ToJSON CalendarDiffDays | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ CalendarDiffDays → Value # toEncoding ∷ CalendarDiffDays → Encoding # toJSONList ∷ [CalendarDiffDays] → Value # toEncodingList ∷ [CalendarDiffDays] → Encoding # | |
| ToJSON Number | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Number → Encoding # toJSONList ∷ [Number] → Value # toEncodingList ∷ [Number] → Encoding # | |
| ToJSON Scientific | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Scientific → Encoding # toJSONList ∷ [Scientific] → Value # toEncodingList ∷ [Scientific] → Encoding # | |
| ToJSON DotNetTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ DotNetTime → Encoding # toJSONList ∷ [DotNetTime] → Value # toEncodingList ∷ [DotNetTime] → Encoding # | |
| ToJSON Value | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Value → Encoding # toJSONList ∷ [Value] → Value # toEncodingList ∷ [Value] → Encoding # | |
| ToJSON ByteSpan | |
Defined in Cardano.Binary.Annotated Methods toEncoding ∷ ByteSpan → Encoding # toJSONList ∷ [ByteSpan] → Value # toEncodingList ∷ [ByteSpan] → Encoding # | |
| ToJSON EpochNo | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ EpochNo → Encoding # toJSONList ∷ [EpochNo] → Value # toEncodingList ∷ [EpochNo] → Encoding # | |
| ToJSON EpochSize | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ EpochSize → Encoding # toJSONList ∷ [EpochSize] → Value # toEncodingList ∷ [EpochSize] → Encoding # | |
| ToJSON SlotNo | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ SlotNo → Encoding # toJSONList ∷ [SlotNo] → Value # toEncodingList ∷ [SlotNo] → Encoding # | |
| ToJSON UUID | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ UUID → Encoding # toJSONList ∷ [UUID] → Value # toEncodingList ∷ [UUID] → Encoding # | |
| ToJSON Coin | |
Defined in Cardano.Ledger.Coin Methods toEncoding ∷ Coin → Encoding # toJSONList ∷ [Coin] → Value # toEncodingList ∷ [Coin] → Encoding # | |
| ToJSON NonNegativeInterval | |
Defined in Cardano.Ledger.BaseTypes Methods toJSON ∷ NonNegativeInterval → Value # toEncoding ∷ NonNegativeInterval → Encoding # toJSONList ∷ [NonNegativeInterval] → Value # toEncodingList ∷ [NonNegativeInterval] → Encoding # | |
| ToJSON UnitInterval | |
Defined in Cardano.Ledger.BaseTypes Methods toJSON ∷ UnitInterval → Value # toEncoding ∷ UnitInterval → Encoding # toJSONList ∷ [UnitInterval] → Value # toEncodingList ∷ [UnitInterval] → Encoding # | |
| ToJSON ProtVer | |
Defined in Shelley.Spec.Ledger.PParams Methods toEncoding ∷ ProtVer → Encoding # toJSONList ∷ [ProtVer] → Value # toEncodingList ∷ [ProtVer] → Encoding # | |
| ToJSON AlonzoGenesis Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ AlonzoGenesis → Value # toEncoding ∷ AlonzoGenesis → Encoding # toJSONList ∷ [AlonzoGenesis] → Value # toEncodingList ∷ [AlonzoGenesis] → Encoding # | |
| ToJSON Language Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ Language → Encoding # toJSONList ∷ [Language] → Value # toEncodingList ∷ [Language] → Encoding # | |
| ToJSON CostModel Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ CostModel → Encoding # toJSONList ∷ [CostModel] → Value # toEncodingList ∷ [CostModel] → Encoding # | |
| ToJSON Prices Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ Prices → Encoding # toJSONList ∷ [Prices] → Value # toEncodingList ∷ [Prices] → Encoding # | |
| ToJSON ExUnits Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ ExUnits → Encoding # toJSONList ∷ [ExUnits] → Value # toEncodingList ∷ [ExUnits] → Encoding # | |
| ToJSON AssetClass | |
Defined in Plutus.V1.Ledger.Value Methods toEncoding ∷ AssetClass → Encoding # toJSONList ∷ [AssetClass] → Value # toEncodingList ∷ [AssetClass] → Encoding # | |
| ToJSON CurrencySymbol | |
Defined in Plutus.V1.Ledger.Value Methods toJSON ∷ CurrencySymbol → Value # toEncoding ∷ CurrencySymbol → Encoding # toJSONList ∷ [CurrencySymbol] → Value # toEncodingList ∷ [CurrencySymbol] → Encoding # | |
| ToJSON TokenName | |
Defined in Plutus.V1.Ledger.Value Methods toEncoding ∷ TokenName → Encoding # toJSONList ∷ [TokenName] → Value # toEncodingList ∷ [TokenName] → Encoding # | |
| ToJSON Value | |
Defined in Plutus.V1.Ledger.Value Methods toEncoding ∷ Value → Encoding # toJSONList ∷ [Value] → Value0 # toEncodingList ∷ [Value] → Encoding # | |
| ToJSON MintingPolicyHash | |
Defined in Plutus.V1.Ledger.Scripts Methods toJSON ∷ MintingPolicyHash → Value # toEncoding ∷ MintingPolicyHash → Encoding # toJSONList ∷ [MintingPolicyHash] → Value # toEncodingList ∷ [MintingPolicyHash] → Encoding # | |
| ToJSON Context | |
Defined in Plutus.V1.Ledger.Scripts Methods toEncoding ∷ Context → Encoding # toJSONList ∷ [Context] → Value # toEncodingList ∷ [Context] → Encoding # | |
| ToJSON Datum | |
Defined in Plutus.V1.Ledger.Scripts Methods toEncoding ∷ Datum → Encoding # toJSONList ∷ [Datum] → Value # toEncodingList ∷ [Datum] → Encoding # | |
| ToJSON DatumHash | |
Defined in Plutus.V1.Ledger.Scripts Methods toEncoding ∷ DatumHash → Encoding # toJSONList ∷ [DatumHash] → Value # toEncodingList ∷ [DatumHash] → Encoding # | |
| ToJSON MintingPolicy | |
Defined in Plutus.V1.Ledger.Scripts Methods toJSON ∷ MintingPolicy → Value # toEncoding ∷ MintingPolicy → Encoding # toJSONList ∷ [MintingPolicy] → Value # toEncodingList ∷ [MintingPolicy] → Encoding # | |
| ToJSON Redeemer | |
Defined in Plutus.V1.Ledger.Scripts Methods toEncoding ∷ Redeemer → Encoding # toJSONList ∷ [Redeemer] → Value # toEncodingList ∷ [Redeemer] → Encoding # | |
| ToJSON RedeemerHash | |
Defined in Plutus.V1.Ledger.Scripts Methods toJSON ∷ RedeemerHash → Value # toEncoding ∷ RedeemerHash → Encoding # toJSONList ∷ [RedeemerHash] → Value # toEncodingList ∷ [RedeemerHash] → Encoding # | |
| ToJSON Script | |
Defined in Plutus.V1.Ledger.Scripts Methods toEncoding ∷ Script → Encoding # toJSONList ∷ [Script] → Value # toEncodingList ∷ [Script] → Encoding # | |
| ToJSON ScriptError | |
Defined in Plutus.V1.Ledger.Scripts Methods toJSON ∷ ScriptError → Value # toEncoding ∷ ScriptError → Encoding # toJSONList ∷ [ScriptError] → Value # toEncodingList ∷ [ScriptError] → Encoding # | |
| ToJSON Validator | |
Defined in Plutus.V1.Ledger.Scripts Methods toEncoding ∷ Validator → Encoding # toJSONList ∷ [Validator] → Value # toEncodingList ∷ [Validator] → Encoding # | |
| ToJSON ValidatorHash | |
Defined in Plutus.V1.Ledger.Scripts Methods toJSON ∷ ValidatorHash → Value # toEncoding ∷ ValidatorHash → Encoding # toJSONList ∷ [ValidatorHash] → Value # toEncodingList ∷ [ValidatorHash] → Encoding # | |
| ToJSON AssetName Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ AssetName → Encoding # toJSONList ∷ [AssetName] → Value # toEncodingList ∷ [AssetName] → Encoding # | |
| ToJSON Likelihood Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ Likelihood → Encoding # toJSONList ∷ [Likelihood] → Value # toEncodingList ∷ [Likelihood] → Encoding # | |
| ToJSON Ptr Source # | |
Defined in Cardano.Api.Orphans | |
| ToJSON Nonce | |
Defined in Cardano.Ledger.BaseTypes Methods toEncoding ∷ Nonce → Encoding # toJSONList ∷ [Nonce] → Value # toEncodingList ∷ [Nonce] → Encoding # | |
| ToJSON Desirability | |
Defined in Shelley.Spec.Ledger.RewardProvenance Methods toJSON ∷ Desirability → Value # toEncoding ∷ Desirability → Encoding # toJSONList ∷ [Desirability] → Value # toEncodingList ∷ [Desirability] → Encoding # | |
| ToJSON StakePoolRelay | |
Defined in Shelley.Spec.Ledger.TxBody Methods toJSON ∷ StakePoolRelay → Value # toEncoding ∷ StakePoolRelay → Encoding # toJSONList ∷ [StakePoolRelay] → Value # toEncodingList ∷ [StakePoolRelay] → Encoding # | |
| ToJSON PoolMetadata | |
Defined in Shelley.Spec.Ledger.TxBody Methods toJSON ∷ PoolMetadata → Value # toEncoding ∷ PoolMetadata → Encoding # toJSONList ∷ [PoolMetadata] → Value # toEncodingList ∷ [PoolMetadata] → Encoding # | |
| ToJSON Network | |
Defined in Cardano.Ledger.BaseTypes Methods toEncoding ∷ Network → Encoding # toJSONList ∷ [Network] → Value # toEncodingList ∷ [Network] → Encoding # | |
| ToJSON AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras Methods toJSON ∷ AnyCardanoEra → Value # toEncoding ∷ AnyCardanoEra → Encoding # toJSONList ∷ [AnyCardanoEra] → Value # toEncodingList ∷ [AnyCardanoEra] → Encoding # | |
| ToJSON Month | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Month → Encoding # toJSONList ∷ [Month] → Value # toEncodingList ∷ [Month] → Encoding # | |
| ToJSON Quarter | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Quarter → Encoding # toJSONList ∷ [Quarter] → Value # toEncodingList ∷ [Quarter] → Encoding # | |
| ToJSON QuarterOfYear | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ QuarterOfYear → Value # toEncoding ∷ QuarterOfYear → Encoding # toJSONList ∷ [QuarterOfYear] → Value # toEncodingList ∷ [QuarterOfYear] → Encoding # | |
| ToJSON PositiveUnitInterval | |
Defined in Cardano.Ledger.BaseTypes Methods toJSON ∷ PositiveUnitInterval → Value # toEncoding ∷ PositiveUnitInterval → Encoding # toJSONList ∷ [PositiveUnitInterval] → Value # toEncodingList ∷ [PositiveUnitInterval] → Encoding # | |
| ToJSON EpochNumber | |
Defined in Cardano.Chain.Slotting.EpochNumber Methods toJSON ∷ EpochNumber → Value # toEncoding ∷ EpochNumber → Encoding # toJSONList ∷ [EpochNumber] → Value # toEncodingList ∷ [EpochNumber] → Encoding # | |
| ToJSON SlotNumber | |
Defined in Cardano.Chain.Slotting.SlotNumber Methods toEncoding ∷ SlotNumber → Encoding # toJSONList ∷ [SlotNumber] → Value # toEncodingList ∷ [SlotNumber] → Encoding # | |
| ToJSON RequiresNetworkMagic | |
Defined in Cardano.Crypto.ProtocolMagic Methods toJSON ∷ RequiresNetworkMagic → Value # toEncoding ∷ RequiresNetworkMagic → Encoding # toJSONList ∷ [RequiresNetworkMagic] → Value # toEncodingList ∷ [RequiresNetworkMagic] → Encoding # | |
| ToJSON ProtocolVersion | |
Defined in Cardano.Chain.Update.ProtocolVersion Methods toJSON ∷ ProtocolVersion → Value # toEncoding ∷ ProtocolVersion → Encoding # toJSONList ∷ [ProtocolVersion] → Value # toEncodingList ∷ [ProtocolVersion] → Encoding # | |
| ToJSON ProtocolMagicId | |
Defined in Cardano.Crypto.ProtocolMagic Methods toJSON ∷ ProtocolMagicId → Value # toEncoding ∷ ProtocolMagicId → Encoding # toJSONList ∷ [ProtocolMagicId] → Value # toEncodingList ∷ [ProtocolMagicId] → Encoding # | |
| ToJSON SoftwareVersion | |
Defined in Cardano.Chain.Update.SoftwareVersion Methods toJSON ∷ SoftwareVersion → Value # toEncoding ∷ SoftwareVersion → Encoding # toJSONList ∷ [SoftwareVersion] → Value # toEncodingList ∷ [SoftwareVersion] → Encoding # | |
| ToJSON VerificationKey | |
Defined in Cardano.Crypto.Signing.VerificationKey Methods toJSON ∷ VerificationKey → Value # toEncoding ∷ VerificationKey → Encoding # toJSONList ∷ [VerificationKey] → Value # toEncodingList ∷ [VerificationKey] → Encoding # | |
| ToJSON GenesisHash | |
Defined in Cardano.Chain.Genesis.Hash Methods toJSON ∷ GenesisHash → Value # toEncoding ∷ GenesisHash → Encoding # toJSONList ∷ [GenesisHash] → Value # toEncodingList ∷ [GenesisHash] → Encoding # | |
| ToJSON Tx | |
Defined in Cardano.Chain.UTxO.Tx | |
| ToJSON ProtocolMagic | |
Defined in Cardano.Crypto.ProtocolMagic Methods toJSON ∷ ProtocolMagic → Value # toEncoding ∷ ProtocolMagic → Encoding # toJSONList ∷ [ProtocolMagic] → Value # toEncodingList ∷ [ProtocolMagic] → Encoding # | |
| ToJSON CompactRedeemVerificationKey | |
Defined in Cardano.Crypto.Signing.Redeem.Compact Methods toJSON ∷ CompactRedeemVerificationKey → Value # toEncoding ∷ CompactRedeemVerificationKey → Encoding # toJSONList ∷ [CompactRedeemVerificationKey] → Value # toEncodingList ∷ [CompactRedeemVerificationKey] → Encoding # | |
| ToJSON Lovelace | |
Defined in Cardano.Chain.Common.Lovelace Methods toEncoding ∷ Lovelace → Encoding # toJSONList ∷ [Lovelace] → Value # toEncodingList ∷ [Lovelace] → Encoding # | |
| ToJSON ByteString64 | |
Defined in Data.ByteString.Base64.Type Methods toJSON ∷ ByteString64 → Value # toEncoding ∷ ByteString64 → Encoding # toJSONList ∷ [ByteString64] → Value # toEncodingList ∷ [ByteString64] → Encoding # | |
| ToJSON RedeemVerificationKey | |
Defined in Cardano.Crypto.Signing.Redeem.VerificationKey Methods toJSON ∷ RedeemVerificationKey → Value # toEncoding ∷ RedeemVerificationKey → Encoding # toJSONList ∷ [RedeemVerificationKey] → Value # toEncodingList ∷ [RedeemVerificationKey] → Encoding # | |
| ToJSON CekMachineCosts | |
Defined in UntypedPlutusCore.Evaluation.Machine.Cek.CekMachineCosts Methods toJSON ∷ CekMachineCosts → Value # toEncoding ∷ CekMachineCosts → Encoding # toJSONList ∷ [CekMachineCosts] → Value # toEncodingList ∷ [CekMachineCosts] → Encoding # | |
| ToJSON ChainDifficulty | |
Defined in Cardano.Chain.Common.ChainDifficulty Methods toJSON ∷ ChainDifficulty → Value # toEncoding ∷ ChainDifficulty → Encoding # toJSONList ∷ [ChainDifficulty] → Value # toEncodingList ∷ [ChainDifficulty] → Encoding # | |
| ToJSON Proof | |
Defined in Cardano.Chain.Block.Proof Methods toEncoding ∷ Proof → Encoding # toJSONList ∷ [Proof] → Value # toEncodingList ∷ [Proof] → Encoding # | |
| ToJSON SscPayload | |
Defined in Cardano.Chain.Ssc Methods toEncoding ∷ SscPayload → Encoding # toJSONList ∷ [SscPayload] → Value # toEncodingList ∷ [SscPayload] → Encoding # | |
| ToJSON ProposalBody | |
Defined in Cardano.Chain.Update.Proposal Methods toJSON ∷ ProposalBody → Value # toEncoding ∷ ProposalBody → Encoding # toJSONList ∷ [ProposalBody] → Value # toEncodingList ∷ [ProposalBody] → Encoding # | |
| ToJSON TxInWitness | |
Defined in Cardano.Chain.UTxO.TxWitness Methods toJSON ∷ TxInWitness → Value # toEncoding ∷ TxInWitness → Encoding # toJSONList ∷ [TxInWitness] → Value # toEncodingList ∷ [TxInWitness] → Encoding # | |
| ToJSON TxProof | |
Defined in Cardano.Chain.UTxO.TxProof Methods toEncoding ∷ TxProof → Encoding # toJSONList ∷ [TxProof] → Value # toEncodingList ∷ [TxProof] → Encoding # | |
| ToJSON SscProof | |
Defined in Cardano.Chain.Ssc Methods toEncoding ∷ SscProof → Encoding # toJSONList ∷ [SscProof] → Value # toEncodingList ∷ [SscProof] → Encoding # | |
| ToJSON ApplicationName | |
Defined in Cardano.Chain.Update.ApplicationName Methods toJSON ∷ ApplicationName → Value # toEncoding ∷ ApplicationName → Encoding # toJSONList ∷ [ApplicationName] → Value # toEncodingList ∷ [ApplicationName] → Encoding # | |
| ToJSON AddrAttributes | |
Defined in Cardano.Chain.Common.AddrAttributes Methods toJSON ∷ AddrAttributes → Value # toEncoding ∷ AddrAttributes → Encoding # toJSONList ∷ [AddrAttributes] → Value # toEncodingList ∷ [AddrAttributes] → Encoding # | |
| ToJSON HDAddressPayload | |
Defined in Cardano.Chain.Common.AddrAttributes Methods toJSON ∷ HDAddressPayload → Value # toEncoding ∷ HDAddressPayload → Encoding # toJSONList ∷ [HDAddressPayload] → Value # toEncodingList ∷ [HDAddressPayload] → Encoding # | |
| ToJSON NetworkMagic | |
Defined in Cardano.Chain.Common.NetworkMagic Methods toJSON ∷ NetworkMagic → Value # toEncoding ∷ NetworkMagic → Encoding # toJSONList ∷ [NetworkMagic] → Value # toEncodingList ∷ [NetworkMagic] → Encoding # | |
| ToJSON UnparsedFields | |
Defined in Cardano.Chain.Common.Attributes Methods toJSON ∷ UnparsedFields → Value # toEncoding ∷ UnparsedFields → Encoding # toJSONList ∷ [UnparsedFields] → Value # toEncodingList ∷ [UnparsedFields] → Encoding # | |
| ToJSON AddrType | |
Defined in Cardano.Chain.Common.AddrSpendingData Methods toEncoding ∷ AddrType → Encoding # toJSONList ∷ [AddrType] → Value # toEncodingList ∷ [AddrType] → Encoding # | |
| ToJSON Address | |
Defined in Cardano.Chain.Common.Address Methods toEncoding ∷ Address → Encoding # toJSONList ∷ [Address] → Value # toEncodingList ∷ [Address] → Encoding # | |
| ToJSON LovelacePortion | |
Defined in Cardano.Chain.Common.LovelacePortion Methods toJSON ∷ LovelacePortion → Value # toEncoding ∷ LovelacePortion → Encoding # toJSONList ∷ [LovelacePortion] → Value # toEncodingList ∷ [LovelacePortion] → Encoding # | |
| ToJSON TxFeePolicy | |
Defined in Cardano.Chain.Common.TxFeePolicy Methods toJSON ∷ TxFeePolicy → Value # toEncoding ∷ TxFeePolicy → Encoding # toJSONList ∷ [TxFeePolicy] → Value # toEncodingList ∷ [TxFeePolicy] → Encoding # | |
| ToJSON TxSizeLinear | |
Defined in Cardano.Chain.Common.TxSizeLinear Methods toJSON ∷ TxSizeLinear → Value # toEncoding ∷ TxSizeLinear → Encoding # toJSONList ∷ [TxSizeLinear] → Value # toEncodingList ∷ [TxSizeLinear] → Encoding # | |
| ToJSON TxIn | |
Defined in Cardano.Chain.UTxO.Tx Methods toEncoding ∷ TxIn → Encoding # toJSONList ∷ [TxIn] → Value # toEncodingList ∷ [TxIn] → Encoding # | |
| ToJSON TxOut | |
Defined in Cardano.Chain.UTxO.Tx Methods toEncoding ∷ TxOut → Encoding # toJSONList ∷ [TxOut] → Value # toEncodingList ∷ [TxOut] → Encoding # | |
| ToJSON TxSigData | |
Defined in Cardano.Chain.UTxO.TxWitness Methods toEncoding ∷ TxSigData → Encoding # toJSONList ∷ [TxSigData] → Value # toEncodingList ∷ [TxSigData] → Encoding # | |
| ToJSON InstallerHash | |
Defined in Cardano.Chain.Update.InstallerHash Methods toJSON ∷ InstallerHash → Value # toEncoding ∷ InstallerHash → Encoding # toJSONList ∷ [InstallerHash] → Value # toEncodingList ∷ [InstallerHash] → Encoding # | |
| ToJSON SystemTag | |
Defined in Cardano.Chain.Update.SystemTag Methods toEncoding ∷ SystemTag → Encoding # toJSONList ∷ [SystemTag] → Value # toEncodingList ∷ [SystemTag] → Encoding # | |
| ToJSON ProtocolParametersUpdate | |
Defined in Cardano.Chain.Update.ProtocolParametersUpdate Methods toJSON ∷ ProtocolParametersUpdate → Value # toEncoding ∷ ProtocolParametersUpdate → Encoding # toJSONList ∷ [ProtocolParametersUpdate] → Value # toEncodingList ∷ [ProtocolParametersUpdate] → Encoding # | |
| ToJSON SoftforkRule | |
Defined in Cardano.Chain.Update.SoftforkRule Methods toJSON ∷ SoftforkRule → Value # toEncoding ∷ SoftforkRule → Encoding # toJSONList ∷ [SoftforkRule] → Value # toEncodingList ∷ [SoftforkRule] → Encoding # | |
| ToJSON DnsName | |
Defined in Cardano.Ledger.BaseTypes Methods toEncoding ∷ DnsName → Encoding # toJSONList ∷ [DnsName] → Value # toEncodingList ∷ [DnsName] → Encoding # | |
| ToJSON Port | |
Defined in Cardano.Ledger.BaseTypes Methods toEncoding ∷ Port → Encoding # toJSONList ∷ [Port] → Value # toEncodingList ∷ [Port] → Encoding # | |
| ToJSON PositiveInterval | |
Defined in Cardano.Ledger.BaseTypes Methods toJSON ∷ PositiveInterval → Value # toEncoding ∷ PositiveInterval → Encoding # toJSONList ∷ [PositiveInterval] → Value # toEncodingList ∷ [PositiveInterval] → Encoding # | |
| ToJSON Url | |
Defined in Cardano.Ledger.BaseTypes | |
| ToJSON DeltaCoin Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ DeltaCoin → Encoding # toJSONList ∷ [DeltaCoin] → Value # toEncodingList ∷ [DeltaCoin] → Encoding # | |
| ToJSON ModelAddedSizes | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelAddedSizes → Value # toEncoding ∷ ModelAddedSizes → Encoding # toJSONList ∷ [ModelAddedSizes] → Value # toEncodingList ∷ [ModelAddedSizes] → Encoding # | |
| ToJSON ModelLinearSize | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelLinearSize → Value # toEncoding ∷ ModelLinearSize → Encoding # toJSONList ∷ [ModelLinearSize] → Value # toEncodingList ∷ [ModelLinearSize] → Encoding # | |
| ToJSON ModelMaxSize | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelMaxSize → Value # toEncoding ∷ ModelMaxSize → Encoding # toJSONList ∷ [ModelMaxSize] → Value # toEncodingList ∷ [ModelMaxSize] → Encoding # | |
| ToJSON ModelMinSize | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelMinSize → Value # toEncoding ∷ ModelMinSize → Encoding # toJSONList ∷ [ModelMinSize] → Value # toEncodingList ∷ [ModelMinSize] → Encoding # | |
| ToJSON ModelMultipliedSizes | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelMultipliedSizes → Value # toEncoding ∷ ModelMultipliedSizes → Encoding # toJSONList ∷ [ModelMultipliedSizes] → Value # toEncodingList ∷ [ModelMultipliedSizes] → Encoding # | |
| ToJSON ModelOneArgument | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelOneArgument → Value # toEncoding ∷ ModelOneArgument → Encoding # toJSONList ∷ [ModelOneArgument] → Value # toEncodingList ∷ [ModelOneArgument] → Encoding # | |
| ToJSON ModelOrientation | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelOrientation → Value # toEncoding ∷ ModelOrientation → Encoding # toJSONList ∷ [ModelOrientation] → Value # toEncodingList ∷ [ModelOrientation] → Encoding # | |
| ToJSON ModelSplitConst | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelSplitConst → Value # toEncoding ∷ ModelSplitConst → Encoding # toJSONList ∷ [ModelSplitConst] → Value # toEncodingList ∷ [ModelSplitConst] → Encoding # | |
| ToJSON ModelSubtractedSizes | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelSubtractedSizes → Value # toEncoding ∷ ModelSubtractedSizes → Encoding # toJSONList ∷ [ModelSubtractedSizes] → Value # toEncodingList ∷ [ModelSubtractedSizes] → Encoding # | |
| ToJSON ModelThreeArguments | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelThreeArguments → Value # toEncoding ∷ ModelThreeArguments → Encoding # toJSONList ∷ [ModelThreeArguments] → Value # toEncodingList ∷ [ModelThreeArguments] → Encoding # | |
| ToJSON ModelTwoArguments | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ ModelTwoArguments → Value # toEncoding ∷ ModelTwoArguments → Encoding # toJSONList ∷ [ModelTwoArguments] → Value # toEncodingList ∷ [ModelTwoArguments] → Encoding # | |
| ToJSON ExMemory | |
Defined in PlutusCore.Evaluation.Machine.ExMemory Methods toEncoding ∷ ExMemory → Encoding # toJSONList ∷ [ExMemory] → Value # toEncodingList ∷ [ExMemory] → Encoding # | |
| ToJSON ExBudget | |
Defined in PlutusCore.Evaluation.Machine.ExBudget Methods toEncoding ∷ ExBudget → Encoding # toJSONList ∷ [ExBudget] → Value # toEncodingList ∷ [ExBudget] → Encoding # | |
| ToJSON ExCPU | |
Defined in PlutusCore.Evaluation.Machine.ExMemory Methods toEncoding ∷ ExCPU → Encoding # toJSONList ∷ [ExCPU] → Value # toEncodingList ∷ [ExCPU] → Encoding # | |
| ToJSON Ada | |
Defined in Plutus.V1.Ledger.Ada | |
| ToJSON Address | |
Defined in Plutus.V1.Ledger.Address Methods toEncoding ∷ Address → Encoding # toJSONList ∷ [Address] → Value # toEncodingList ∷ [Address] → Encoding # | |
| ToJSON Credential | |
Defined in Plutus.V1.Ledger.Credential Methods toEncoding ∷ Credential → Encoding # toJSONList ∷ [Credential] → Value # toEncodingList ∷ [Credential] → Encoding # | |
| ToJSON StakingCredential | |
Defined in Plutus.V1.Ledger.Credential Methods toJSON ∷ StakingCredential → Value # toEncoding ∷ StakingCredential → Encoding # toJSONList ∷ [StakingCredential] → Value # toEncodingList ∷ [StakingCredential] → Encoding # | |
| ToJSON PubKeyHash | |
Defined in Plutus.V1.Ledger.Crypto Methods toEncoding ∷ PubKeyHash → Encoding # toJSONList ∷ [PubKeyHash] → Value # toEncodingList ∷ [PubKeyHash] → Encoding # | |
| ToJSON PubKey | |
Defined in Plutus.V1.Ledger.Crypto Methods toEncoding ∷ PubKey → Encoding # toJSONList ∷ [PubKey] → Value # toEncodingList ∷ [PubKey] → Encoding # | |
| ToJSON LedgerBytes | |
Defined in Plutus.V1.Ledger.Bytes Methods toJSON ∷ LedgerBytes → Value # toEncoding ∷ LedgerBytes → Encoding # toJSONList ∷ [LedgerBytes] → Value # toEncodingList ∷ [LedgerBytes] → Encoding # | |
| ToJSON TxOut | |
Defined in Plutus.V1.Ledger.Tx Methods toEncoding ∷ TxOut → Encoding # toJSONList ∷ [TxOut] → Value # toEncodingList ∷ [TxOut] → Encoding # | |
| ToJSON TxOutRef | |
Defined in Plutus.V1.Ledger.Tx Methods toEncoding ∷ TxOutRef → Encoding # toJSONList ∷ [TxOutRef] → Value # toEncodingList ∷ [TxOutRef] → Encoding # | |
| ToJSON DCert | |
Defined in Plutus.V1.Ledger.DCert Methods toEncoding ∷ DCert → Encoding # toJSONList ∷ [DCert] → Value # toEncodingList ∷ [DCert] → Encoding # | |
| ToJSON TxId | |
Defined in Plutus.V1.Ledger.TxId Methods toEncoding ∷ TxId → Encoding # toJSONList ∷ [TxId] → Value # toEncodingList ∷ [TxId] → Encoding # | |
| ToJSON POSIXTime | |
Defined in Plutus.V1.Ledger.Time Methods toEncoding ∷ POSIXTime → Encoding # toJSONList ∷ [POSIXTime] → Value # toEncodingList ∷ [POSIXTime] → Encoding # | |
| ToJSON Signature | |
Defined in Plutus.V1.Ledger.Crypto Methods toEncoding ∷ Signature → Encoding # toJSONList ∷ [Signature] → Value # toEncodingList ∷ [Signature] → Encoding # | |
| ToJSON PrivateKey | |
Defined in Plutus.V1.Ledger.Crypto Methods toEncoding ∷ PrivateKey → Encoding # toJSONList ∷ [PrivateKey] → Value # toEncodingList ∷ [PrivateKey] → Encoding # | |
| ToJSON Slot | |
Defined in Plutus.V1.Ledger.Slot Methods toEncoding ∷ Slot → Encoding # toJSONList ∷ [Slot] → Value # toEncodingList ∷ [Slot] → Encoding # | |
| ToJSON DiffSeconds | |
Defined in Plutus.V1.Ledger.Time Methods toJSON ∷ DiffSeconds → Value # toEncoding ∷ DiffSeconds → Encoding # toJSONList ∷ [DiffSeconds] → Value # toEncodingList ∷ [DiffSeconds] → Encoding # | |
| ToJSON RedeemerPtr | |
Defined in Plutus.V1.Ledger.Tx Methods toJSON ∷ RedeemerPtr → Value # toEncoding ∷ RedeemerPtr → Encoding # toJSONList ∷ [RedeemerPtr] → Value # toEncodingList ∷ [RedeemerPtr] → Encoding # | |
| ToJSON ScriptTag | |
Defined in Plutus.V1.Ledger.Tx Methods toEncoding ∷ ScriptTag → Encoding # toJSONList ∷ [ScriptTag] → Value # toEncodingList ∷ [ScriptTag] → Encoding # | |
| ToJSON Tx | |
Defined in Plutus.V1.Ledger.Tx | |
| ToJSON TxIn | |
Defined in Plutus.V1.Ledger.Tx Methods toEncoding ∷ TxIn → Encoding # toJSONList ∷ [TxIn] → Value # toEncodingList ∷ [TxIn] → Encoding # | |
| ToJSON TxInType | |
Defined in Plutus.V1.Ledger.Tx Methods toEncoding ∷ TxInType → Encoding # toJSONList ∷ [TxInType] → Value # toEncodingList ∷ [TxInType] → Encoding # | |
| ToJSON TxOutTx | |
Defined in Plutus.V1.Ledger.Tx Methods toEncoding ∷ TxOutTx → Encoding # toJSONList ∷ [TxOutTx] → Value # toEncodingList ∷ [TxOutTx] → Encoding # | |
| ToJSON AccountState Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ AccountState → Value # toEncoding ∷ AccountState → Encoding # toJSONList ∷ [AccountState] → Value # toEncodingList ∷ [AccountState] → Encoding # | |
| ToJSON RewardType Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ RewardType → Encoding # toJSONList ∷ [RewardType] → Value # toEncodingList ∷ [RewardType] → Encoding # | |
| ToJSON StudentT | |
Defined in Statistics.Distribution.StudentT Methods toEncoding ∷ StudentT → Encoding # toJSONList ∷ [StudentT] → Value # toEncodingList ∷ [StudentT] → Encoding # | |
| ToJSON TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods toJSON ∷ TextEnvelope → Value # toEncoding ∷ TextEnvelope → Encoding # toJSONList ∷ [TextEnvelope] → Value # toEncodingList ∷ [TextEnvelope] → Encoding # | |
| ToJSON TextEnvelopeDescr Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods toJSON ∷ TextEnvelopeDescr → Value # toEncoding ∷ TextEnvelopeDescr → Encoding # toJSONList ∷ [TextEnvelopeDescr] → Value # toEncodingList ∷ [TextEnvelopeDescr] → Encoding # | |
| ToJSON TextEnvelopeType Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods toJSON ∷ TextEnvelopeType → Value # toEncoding ∷ TextEnvelopeType → Encoding # toJSONList ∷ [TextEnvelopeType] → Value # toEncodingList ∷ [TextEnvelopeType] → Encoding # | |
| ToJSON TxSubmitStatus Source # | |
Defined in Cardano.Api.TxSubmit.Types Methods toJSON ∷ TxSubmitStatus → Value # toEncoding ∷ TxSubmitStatus → Encoding # toJSONList ∷ [TxSubmitStatus] → Value # toEncodingList ∷ [TxSubmitStatus] → Encoding # | |
| ToJSON ScriptHash Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ ScriptHash → Value # toEncoding ∷ ScriptHash → Encoding # toJSONList ∷ [ScriptHash] → Value # toEncodingList ∷ [ScriptHash] → Encoding # | |
| ToJSON ExecutionUnits Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ ExecutionUnits → Value # toEncoding ∷ ExecutionUnits → Encoding # toJSONList ∷ [ExecutionUnits] → Value # toEncodingList ∷ [ExecutionUnits] → Encoding # | |
| ToJSON AnyPlutusScriptVersion Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ AnyPlutusScriptVersion → Value # toEncoding ∷ AnyPlutusScriptVersion → Encoding # toJSONList ∷ [AnyPlutusScriptVersion] → Value # toEncodingList ∷ [AnyPlutusScriptVersion] → Encoding # | |
| ToJSON ValueNestedRep Source # | |
Defined in Cardano.Api.Value Methods toJSON ∷ ValueNestedRep → Value # toEncoding ∷ ValueNestedRep → Encoding # toJSONList ∷ [ValueNestedRep] → Value # toEncodingList ∷ [ValueNestedRep] → Encoding # | |
| ToJSON Value Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Value → Encoding # toJSONList ∷ [Value] → Value0 # toEncodingList ∷ [Value] → Encoding # | |
| ToJSON AssetName Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ AssetName → Encoding # toJSONList ∷ [AssetName] → Value # toEncodingList ∷ [AssetName] → Encoding # | |
| ToJSON PolicyId Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ PolicyId → Encoding # toJSONList ∷ [PolicyId] → Value # toEncodingList ∷ [PolicyId] → Encoding # | |
| ToJSON Quantity Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Quantity → Encoding # toJSONList ∷ [Quantity] → Value # toEncodingList ∷ [Quantity] → Encoding # | |
| ToJSON Lovelace Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Lovelace → Encoding # toJSONList ∷ [Lovelace] → Value # toEncodingList ∷ [Lovelace] → Encoding # | |
| ToJSON CostModel Source # | |
Defined in Cardano.Api.ProtocolParameters Methods toEncoding ∷ CostModel → Encoding # toJSONList ∷ [CostModel] → Value # toEncodingList ∷ [CostModel] → Encoding # | |
| ToJSON ExecutionUnitPrices Source # | |
Defined in Cardano.Api.ProtocolParameters Methods toJSON ∷ ExecutionUnitPrices → Value # toEncoding ∷ ExecutionUnitPrices → Encoding # toJSONList ∷ [ExecutionUnitPrices] → Value # toEncodingList ∷ [ExecutionUnitPrices] → Encoding # | |
| ToJSON PraosNonce Source # | |
Defined in Cardano.Api.ProtocolParameters Methods toJSON ∷ PraosNonce → Value # toEncoding ∷ PraosNonce → Encoding # toJSONList ∷ [PraosNonce] → Value # toEncodingList ∷ [PraosNonce] → Encoding # | |
| ToJSON ProtocolParameters Source # | |
Defined in Cardano.Api.ProtocolParameters Methods toJSON ∷ ProtocolParameters → Value # toEncoding ∷ ProtocolParameters → Encoding # toJSONList ∷ [ProtocolParameters] → Value # toEncodingList ∷ [ProtocolParameters] → Encoding # | |
| ToJSON TxIx Source # | |
Defined in Cardano.Api.TxBody Methods toEncoding ∷ TxIx → Encoding # toJSONList ∷ [TxIx] → Value # toEncodingList ∷ [TxIx] → Encoding # | |
| ToJSON TxIn Source # | |
Defined in Cardano.Api.TxBody Methods toEncoding ∷ TxIn → Encoding # toJSONList ∷ [TxIn] → Value # toEncodingList ∷ [TxIn] → Encoding # | |
| ToJSON TxId Source # | |
Defined in Cardano.Api.TxBody Methods toEncoding ∷ TxId → Encoding # toJSONList ∷ [TxId] → Value # toEncodingList ∷ [TxId] → Encoding # | |
| ToJSON ChainTip Source # | |
Defined in Cardano.Api.Block Methods toEncoding ∷ ChainTip → Encoding # toJSONList ∷ [ChainTip] → Value # toEncodingList ∷ [ChainTip] → Encoding # | |
| ToJSON a ⇒ ToJSON [a] | |
Defined in Data.Aeson.Types.ToJSON | |
| ToJSON a ⇒ ToJSON (Maybe a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Maybe a → Encoding # toJSONList ∷ [Maybe a] → Value # toEncodingList ∷ [Maybe a] → Encoding # | |
| (ToJSON a, Integral a) ⇒ ToJSON (Ratio a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Ratio a → Encoding # toJSONList ∷ [Ratio a] → Value # toEncodingList ∷ [Ratio a] → Encoding # | |
| ToJSON a ⇒ ToJSON (First a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ First a → Encoding # toJSONList ∷ [First a] → Value # toEncodingList ∷ [First a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Last a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Last a → Encoding # toJSONList ∷ [Last a] → Value # toEncodingList ∷ [Last a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Set a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Set a → Encoding # toJSONList ∷ [Set a] → Value # toEncodingList ∷ [Set a] → Encoding # | |
| ToJSON a ⇒ ToJSON (NonEmpty a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ NonEmpty a → Encoding # toJSONList ∷ [NonEmpty a] → Value # toEncodingList ∷ [NonEmpty a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Identity a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Identity a → Encoding # toJSONList ∷ [Identity a] → Value # toEncodingList ∷ [Identity a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Min a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Min a → Encoding # toJSONList ∷ [Min a] → Value # toEncodingList ∷ [Min a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Max a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Max a → Encoding # toJSONList ∷ [Max a] → Value # toEncodingList ∷ [Max a] → Encoding # | |
| ToJSON a ⇒ ToJSON (WrappedMonoid a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ WrappedMonoid a → Value # toEncoding ∷ WrappedMonoid a → Encoding # toJSONList ∷ [WrappedMonoid a] → Value # toEncodingList ∷ [WrappedMonoid a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Option a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Option a → Encoding # toJSONList ∷ [Option a] → Value # toEncodingList ∷ [Option a] → Encoding # | |
| ToJSON a ⇒ ToJSON (First a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ First a → Encoding # toJSONList ∷ [First a] → Value # toEncodingList ∷ [First a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Last a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Last a → Encoding # toJSONList ∷ [Last a] → Value # toEncodingList ∷ [Last a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Dual a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Dual a → Encoding # toJSONList ∷ [Dual a] → Value # toEncodingList ∷ [Dual a] → Encoding # | |
| ToJSON a ⇒ ToJSON (IntMap a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ IntMap a → Encoding # toJSONList ∷ [IntMap a] → Value # toEncodingList ∷ [IntMap a] → Encoding # | |
| ToJSON v ⇒ ToJSON (Tree v) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Tree v → Encoding # toJSONList ∷ [Tree v] → Value # toEncodingList ∷ [Tree v] → Encoding # | |
| ToJSON a ⇒ ToJSON (Seq a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Seq a → Encoding # toJSONList ∷ [Seq a] → Value # toEncodingList ∷ [Seq a] → Encoding # | |
| (Vector Vector a, ToJSON a) ⇒ ToJSON (Vector a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Vector a → Encoding # toJSONList ∷ [Vector a] → Value # toEncodingList ∷ [Vector a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Vector a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Vector a → Encoding # toJSONList ∷ [Vector a] → Value # toEncodingList ∷ [Vector a] → Encoding # | |
| ToJSON1 f ⇒ ToJSON (Fix f) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Fix f → Encoding # toJSONList ∷ [Fix f] → Value # toEncodingList ∷ [Fix f] → Encoding # | |
| (ToJSON1 f, Functor f) ⇒ ToJSON (Mu f) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Mu f → Encoding # toJSONList ∷ [Mu f] → Value # toEncodingList ∷ [Mu f] → Encoding # | |
| (ToJSON1 f, Functor f) ⇒ ToJSON (Nu f) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Nu f → Encoding # toJSONList ∷ [Nu f] → Value # toEncodingList ∷ [Nu f] → Encoding # | |
| ToJSON a ⇒ ToJSON (DNonEmpty a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ DNonEmpty a → Value # toEncoding ∷ DNonEmpty a → Encoding # toJSONList ∷ [DNonEmpty a] → Value # toEncodingList ∷ [DNonEmpty a] → Encoding # | |
| ToJSON a ⇒ ToJSON (DList a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ DList a → Encoding # toJSONList ∷ [DList a] → Value # toEncodingList ∷ [DList a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Array a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Array a → Encoding # toJSONList ∷ [Array a] → Value # toEncodingList ∷ [Array a] → Encoding # | |
| (Prim a, ToJSON a) ⇒ ToJSON (PrimArray a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ PrimArray a → Value # toEncoding ∷ PrimArray a → Encoding # toJSONList ∷ [PrimArray a] → Value # toEncodingList ∷ [PrimArray a] → Encoding # | |
| ToJSON a ⇒ ToJSON (SmallArray a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ SmallArray a → Value # toEncoding ∷ SmallArray a → Encoding # toJSONList ∷ [SmallArray a] → Value # toEncodingList ∷ [SmallArray a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Maybe a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Maybe a → Encoding # toJSONList ∷ [Maybe a] → Value # toEncodingList ∷ [Maybe a] → Encoding # | |
| ToJSON a ⇒ ToJSON (HashSet a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ HashSet a → Encoding # toJSONList ∷ [HashSet a] → Value # toEncodingList ∷ [HashSet a] → Encoding # | |
| (Prim a, ToJSON a) ⇒ ToJSON (Vector a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Vector a → Encoding # toJSONList ∷ [Vector a] → Value # toEncodingList ∷ [Vector a] → Encoding # | |
| (Storable a, ToJSON a) ⇒ ToJSON (Vector a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Vector a → Encoding # toJSONList ∷ [Vector a] → Value # toEncodingList ∷ [Vector a] → Encoding # | |
| ToJSON (ScriptHash crypto) | |
Defined in Cardano.Ledger.Hashes Methods toJSON ∷ ScriptHash crypto → Value # toEncoding ∷ ScriptHash crypto → Encoding # toJSONList ∷ [ScriptHash crypto] → Value # toEncodingList ∷ [ScriptHash crypto] → Encoding # | |
| ToJSON a ⇒ ToJSON (StrictMaybe a) | |
Defined in Data.Maybe.Strict Methods toJSON ∷ StrictMaybe a → Value # toEncoding ∷ StrictMaybe a → Encoding # toJSONList ∷ [StrictMaybe a] → Value # toEncodingList ∷ [StrictMaybe a] → Encoding # | |
| (ToJSON (PParamsDelta era), UsesPParams era) ⇒ ToJSON (PPUPState era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PPUPState era → Value # toEncoding ∷ PPUPState era → Encoding # toJSONList ∷ [PPUPState era] → Value # toEncodingList ∷ [PPUPState era] → Encoding # | |
| ToJSON (Value era) Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ Value era → Encoding # toJSONList ∷ [Value era] → Value0 # toEncodingList ∷ [Value era] → Encoding # | |
| ToJSON (PParamsUpdate (AlonzoEra StandardCrypto)) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PParamsUpdate (AlonzoEra StandardCrypto) → Value # toEncoding ∷ PParamsUpdate (AlonzoEra StandardCrypto) → Encoding # toJSONList ∷ [PParamsUpdate (AlonzoEra StandardCrypto)] → Value # toEncodingList ∷ [PParamsUpdate (AlonzoEra StandardCrypto)] → Encoding # | |
| ToJSON (PParams era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PParams era → Value # toEncoding ∷ PParams era → Encoding # toJSONList ∷ [PParams era] → Value # toEncodingList ∷ [PParams era] → Encoding # | |
| (ShelleyBasedEra era, ToJSON (Value era)) ⇒ ToJSON (TxOut era) Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ TxOut era → Encoding # toJSONList ∷ [TxOut era] → Value # toEncodingList ∷ [TxOut era] → Encoding # | |
| ToJSON (PParams era) | |
Defined in Shelley.Spec.Ledger.PParams Methods toJSON ∷ PParams era → Value # toEncoding ∷ PParams era → Encoding # toJSONList ∷ [PParams era] → Value # toEncodingList ∷ [PParams era] → Encoding # | |
| ToJSON (PParamsUpdate era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PParamsUpdate era → Value # toEncoding ∷ PParamsUpdate era → Encoding # toJSONList ∷ [PParamsUpdate era] → Value # toEncodingList ∷ [PParamsUpdate era] → Encoding # | |
| (ShelleyBasedEra era, ToJSON (TxOut era), ToJSON (PParams era), ToJSON (PParamsDelta era)) ⇒ ToJSON (EpochState era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ EpochState era → Value # toEncoding ∷ EpochState era → Encoding # toJSONList ∷ [EpochState era] → Value # toEncodingList ∷ [EpochState era] → Encoding # | |
| (ShelleyBasedEra era, ToJSON (TxOut era), ToJSON (PParamsDelta era)) ⇒ ToJSON (LedgerState era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ LedgerState era → Value # toEncoding ∷ LedgerState era → Encoding # toJSONList ∷ [LedgerState era] → Value # toEncodingList ∷ [LedgerState era] → Encoding # | |
| (ShelleyBasedEra era, ToJSON (TxOut era), ToJSON (PParamsDelta era)) ⇒ ToJSON (UTxOState era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ UTxOState era → Value # toEncoding ∷ UTxOState era → Encoding # toJSONList ∷ [UTxOState era] → Value # toEncodingList ∷ [UTxOState era] → Encoding # | |
| Crypto crypto ⇒ ToJSON (DPState crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ DPState crypto → Value # toEncoding ∷ DPState crypto → Encoding # toJSONList ∷ [DPState crypto] → Value # toEncodingList ∷ [DPState crypto] → Encoding # | |
| ToJSON (Addr crypto) | |
Defined in Cardano.Ledger.Address Methods toJSON ∷ Addr crypto → Value # toEncoding ∷ Addr crypto → Encoding # toJSONList ∷ [Addr crypto] → Value # toEncodingList ∷ [Addr crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (BlocksMade crypto) | |
Defined in Shelley.Spec.Ledger.EpochBoundary Methods toJSON ∷ BlocksMade crypto → Value # toEncoding ∷ BlocksMade crypto → Encoding # toJSONList ∷ [BlocksMade crypto] → Value # toEncodingList ∷ [BlocksMade crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (SnapShots crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ SnapShots crypto → Value # toEncoding ∷ SnapShots crypto → Encoding # toJSONList ∷ [SnapShots crypto] → Value # toEncodingList ∷ [SnapShots crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (NonMyopic crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ NonMyopic crypto → Value # toEncoding ∷ NonMyopic crypto → Encoding # toJSONList ∷ [NonMyopic crypto] → Value # toEncodingList ∷ [NonMyopic crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (PulsingRewUpdate crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PulsingRewUpdate crypto → Value # toEncoding ∷ PulsingRewUpdate crypto → Encoding # toJSONList ∷ [PulsingRewUpdate crypto] → Value # toEncodingList ∷ [PulsingRewUpdate crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (PoolDistr crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PoolDistr crypto → Value # toEncoding ∷ PoolDistr crypto → Encoding # toJSONList ∷ [PoolDistr crypto] → Value # toEncodingList ∷ [PoolDistr crypto] → Encoding # | |
| (ToJSON (PParamsDelta era), UsesPParams era) ⇒ ToJSON (ProposedPPUpdates era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ ProposedPPUpdates era → Value # toEncoding ∷ ProposedPPUpdates era → Encoding # toJSONList ∷ [ProposedPPUpdates era] → Value # toEncodingList ∷ [ProposedPPUpdates era] → Encoding # | |
| Era era ⇒ ToJSON (ShelleyGenesis era) | |
Defined in Shelley.Spec.Ledger.Genesis Methods toJSON ∷ ShelleyGenesis era → Value # toEncoding ∷ ShelleyGenesis era → Encoding # toJSONList ∷ [ShelleyGenesis era] → Value # toEncodingList ∷ [ShelleyGenesis era] → Encoding # | |
| Crypto crypto ⇒ ToJSON (GenDelegPair crypto) | |
Defined in Cardano.Ledger.Keys Methods toJSON ∷ GenDelegPair crypto → Value # toEncoding ∷ GenDelegPair crypto → Encoding # toJSONList ∷ [GenDelegPair crypto] → Value # toEncodingList ∷ [GenDelegPair crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (ShelleyGenesisStaking crypto) | |
Defined in Shelley.Spec.Ledger.Genesis Methods toJSON ∷ ShelleyGenesisStaking crypto → Value # toEncoding ∷ ShelleyGenesisStaking crypto → Encoding # toJSONList ∷ [ShelleyGenesisStaking crypto] → Value # toEncodingList ∷ [ShelleyGenesisStaking crypto] → Encoding # | |
| (ShelleyBasedEra era, ToJSON (TxOut era)) ⇒ ToJSON (UTxO era) Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ UTxO era → Encoding # toJSONList ∷ [UTxO era] → Value # toEncodingList ∷ [UTxO era] → Encoding # | |
| Crypto crypto ⇒ ToJSON (TxIn crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ TxIn crypto → Value # toEncoding ∷ TxIn crypto → Encoding # toJSONList ∷ [TxIn crypto] → Value # toEncodingList ∷ [TxIn crypto] → Encoding # | |
| (Era era, Show (Value era), ToJSON (Value era)) ⇒ ToJSON (TxOut era) Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ TxOut era → Encoding # toJSONList ∷ [TxOut era] → Value # toEncodingList ∷ [TxOut era] → Encoding # | |
| ToJSON (PolicyID era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PolicyID era → Value # toEncoding ∷ PolicyID era → Encoding # toJSONList ∷ [PolicyID era] → Value # toEncodingList ∷ [PolicyID era] → Encoding # | |
| Crypto crypto ⇒ ToJSON (PState crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PState crypto → Value # toEncoding ∷ PState crypto → Encoding # toJSONList ∷ [PState crypto] → Value # toEncodingList ∷ [PState crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (PoolParams crypto) | |
Defined in Shelley.Spec.Ledger.TxBody Methods toJSON ∷ PoolParams crypto → Value # toEncoding ∷ PoolParams crypto → Encoding # toJSONList ∷ [PoolParams crypto] → Value # toEncodingList ∷ [PoolParams crypto] → Encoding # | |
| ToJSON (InstantaneousRewards crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ InstantaneousRewards crypto → Value # toEncoding ∷ InstantaneousRewards crypto → Encoding # toJSONList ∷ [InstantaneousRewards crypto] → Value # toEncodingList ∷ [InstantaneousRewards crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (SnapShot crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ SnapShot crypto → Value # toEncoding ∷ SnapShot crypto → Encoding # toJSONList ∷ [SnapShot crypto] → Value # toEncodingList ∷ [SnapShot crypto] → Encoding # | |
| ToJSON (FutureGenDeleg crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ FutureGenDeleg crypto → Value # toEncoding ∷ FutureGenDeleg crypto → Encoding # toJSONList ∷ [FutureGenDeleg crypto] → Value # toEncodingList ∷ [FutureGenDeleg crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (DState crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ DState crypto → Value # toEncoding ∷ DState crypto → Encoding # toJSONList ∷ [DState crypto] → Value # toEncodingList ∷ [DState crypto] → Encoding # | |
| ToJSON (IndividualPoolStake crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ IndividualPoolStake crypto → Value # toEncoding ∷ IndividualPoolStake crypto → Encoding # toJSONList ∷ [IndividualPoolStake crypto] → Value # toEncodingList ∷ [IndividualPoolStake crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (RewardProvenance crypto) | |
Defined in Shelley.Spec.Ledger.RewardProvenance Methods toJSON ∷ RewardProvenance crypto → Value # toEncoding ∷ RewardProvenance crypto → Encoding # toJSONList ∷ [RewardProvenance crypto] → Value # toEncodingList ∷ [RewardProvenance crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (RewardProvenancePool crypto) | |
Defined in Shelley.Spec.Ledger.RewardProvenance Methods toJSON ∷ RewardProvenancePool crypto → Value # toEncoding ∷ RewardProvenancePool crypto → Encoding # toJSONList ∷ [RewardProvenancePool crypto] → Value # toEncodingList ∷ [RewardProvenancePool crypto] → Encoding # | |
| ToJSON (RewardAcnt crypto) | |
Defined in Cardano.Ledger.Address Methods toJSON ∷ RewardAcnt crypto → Value # toEncoding ∷ RewardAcnt crypto → Encoding # toJSONList ∷ [RewardAcnt crypto] → Value # toEncodingList ∷ [RewardAcnt crypto] → Encoding # | |
| ToJSON (CardanoEra era) Source # | |
Defined in Cardano.Api.Eras Methods toJSON ∷ CardanoEra era → Value # toEncoding ∷ CardanoEra era → Encoding # toJSONList ∷ [CardanoEra era] → Value # toEncodingList ∷ [CardanoEra era] → Encoding # | |
| ToJSON (Hash StakePoolKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods toJSON ∷ Hash StakePoolKey → Value # toEncoding ∷ Hash StakePoolKey → Encoding # toJSONList ∷ [Hash StakePoolKey] → Value # toEncodingList ∷ [Hash StakePoolKey] → Encoding # | |
| ToJSON (Hash ScriptData) Source # | |
Defined in Cardano.Api.ScriptData Methods toJSON ∷ Hash ScriptData → Value # toEncoding ∷ Hash ScriptData → Encoding # toJSONList ∷ [Hash ScriptData] → Value # toEncodingList ∷ [Hash ScriptData] → Encoding # | |
| ToJSON a ⇒ ToJSON (AHeader a) | |
Defined in Cardano.Chain.Block.Header Methods toEncoding ∷ AHeader a → Encoding # toJSONList ∷ [AHeader a] → Value # toEncodingList ∷ [AHeader a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ATxAux a) | |
Defined in Cardano.Chain.UTxO.TxAux Methods toEncoding ∷ ATxAux a → Encoding # toJSONList ∷ [ATxAux a] → Value # toEncodingList ∷ [ATxAux a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ACertificate a) | |
Defined in Cardano.Chain.Delegation.Certificate Methods toJSON ∷ ACertificate a → Value # toEncoding ∷ ACertificate a → Encoding # toJSONList ∷ [ACertificate a] → Value # toEncodingList ∷ [ACertificate a] → Encoding # | |
| ToJSON a ⇒ ToJSON (AProposal a) | |
Defined in Cardano.Chain.Update.Proposal Methods toJSON ∷ AProposal a → Value # toEncoding ∷ AProposal a → Encoding # toJSONList ∷ [AProposal a] → Value # toEncodingList ∷ [AProposal a] → Encoding # | |
| ToJSON a ⇒ ToJSON (AVote a) | |
Defined in Cardano.Chain.Update.Vote Methods toEncoding ∷ AVote a → Encoding # toJSONList ∷ [AVote a] → Value # toEncodingList ∷ [AVote a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABlockOrBoundary a) | |
Defined in Cardano.Chain.Block.Block Methods toJSON ∷ ABlockOrBoundary a → Value # toEncoding ∷ ABlockOrBoundary a → Encoding # toJSONList ∷ [ABlockOrBoundary a] → Value # toEncodingList ∷ [ABlockOrBoundary a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABoundaryHeader a) | |
Defined in Cardano.Chain.Block.Header Methods toJSON ∷ ABoundaryHeader a → Value # toEncoding ∷ ABoundaryHeader a → Encoding # toJSONList ∷ [ABoundaryHeader a] → Value # toEncodingList ∷ [ABoundaryHeader a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABoundaryBlock a) | |
Defined in Cardano.Chain.Block.Block Methods toJSON ∷ ABoundaryBlock a → Value # toEncoding ∷ ABoundaryBlock a → Encoding # toJSONList ∷ [ABoundaryBlock a] → Value # toEncodingList ∷ [ABoundaryBlock a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABlock a) | |
Defined in Cardano.Chain.Block.Block Methods toEncoding ∷ ABlock a → Encoding # toJSONList ∷ [ABlock a] → Value # toEncodingList ∷ [ABlock a] → Encoding # | |
| ToJSON a ⇒ ToJSON (RedeemSignature a) | |
Defined in Cardano.Crypto.Signing.Redeem.Signature Methods toJSON ∷ RedeemSignature a → Value # toEncoding ∷ RedeemSignature a → Encoding # toJSONList ∷ [RedeemSignature a] → Value # toEncodingList ∷ [RedeemSignature a] → Encoding # | |
| ToJSON (Signature w) | |
Defined in Cardano.Crypto.Signing.Signature Methods toJSON ∷ Signature w → Value # toEncoding ∷ Signature w → Encoding # toJSONList ∷ [Signature w] → Value # toEncodingList ∷ [Signature w] → Encoding # | |
| Crypto crypto ⇒ ToJSON (GenDelegs crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ GenDelegs crypto → Value # toEncoding ∷ GenDelegs crypto → Encoding # toJSONList ∷ [GenDelegs crypto] → Value # toEncodingList ∷ [GenDelegs crypto] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABoundaryBody a) | |
Defined in Cardano.Chain.Block.Block Methods toJSON ∷ ABoundaryBody a → Value # toEncoding ∷ ABoundaryBody a → Encoding # toJSONList ∷ [ABoundaryBody a] → Value # toEncodingList ∷ [ABoundaryBody a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABody a) | |
Defined in Cardano.Chain.Block.Body Methods toEncoding ∷ ABody a → Encoding # toJSONList ∷ [ABody a] → Value # toEncodingList ∷ [ABody a] → Encoding # | |
| ToJSON a ⇒ ToJSON (APayload a) | |
Defined in Cardano.Chain.Delegation.Payload Methods toEncoding ∷ APayload a → Encoding # toJSONList ∷ [APayload a] → Value # toEncodingList ∷ [APayload a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABlockSignature a) | |
Defined in Cardano.Chain.Block.Header Methods toJSON ∷ ABlockSignature a → Value # toEncoding ∷ ABlockSignature a → Encoding # toJSONList ∷ [ABlockSignature a] → Value # toEncodingList ∷ [ABlockSignature a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ATxPayload a) | |
Defined in Cardano.Chain.UTxO.TxPayload Methods toJSON ∷ ATxPayload a → Value # toEncoding ∷ ATxPayload a → Encoding # toJSONList ∷ [ATxPayload a] → Value # toEncodingList ∷ [ATxPayload a] → Encoding # | |
| ToJSON a ⇒ ToJSON (APayload a) | |
Defined in Cardano.Chain.Update.Payload Methods toEncoding ∷ APayload a → Encoding # toJSONList ∷ [APayload a] → Value # toEncodingList ∷ [APayload a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Attributes a) | |
Defined in Cardano.Chain.Common.Attributes Methods toJSON ∷ Attributes a → Value # toEncoding ∷ Attributes a → Encoding # toJSONList ∷ [Attributes a] → Value # toEncodingList ∷ [Attributes a] → Encoding # | |
| ToJSON a ⇒ ToJSON (MerkleRoot a) | |
Defined in Cardano.Chain.Common.Merkle Methods toJSON ∷ MerkleRoot a → Value # toEncoding ∷ MerkleRoot a → Encoding # toJSONList ∷ [MerkleRoot a] → Value # toEncodingList ∷ [MerkleRoot a] → Encoding # | |
| ToJSON (BuiltinCostModelBase CostingFun) | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ BuiltinCostModelBase CostingFun → Value # toEncoding ∷ BuiltinCostModelBase CostingFun → Encoding # toJSONList ∷ [BuiltinCostModelBase CostingFun] → Value # toEncodingList ∷ [BuiltinCostModelBase CostingFun] → Encoding # | |
| ToJSON model ⇒ ToJSON (CostingFun model) | |
Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel Methods toJSON ∷ CostingFun model → Value # toEncoding ∷ CostingFun model → Encoding # toJSONList ∷ [CostingFun model] → Value # toEncodingList ∷ [CostingFun model] → Encoding # | |
| ToJSON a ⇒ ToJSON (Extended a) | |
Defined in Plutus.V1.Ledger.Interval Methods toEncoding ∷ Extended a → Encoding # toJSONList ∷ [Extended a] → Value # toEncodingList ∷ [Extended a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Interval a) | |
Defined in Plutus.V1.Ledger.Interval Methods toEncoding ∷ Interval a → Encoding # toJSONList ∷ [Interval a] → Value # toEncodingList ∷ [Interval a] → Encoding # | |
| ToJSON a ⇒ ToJSON (LowerBound a) | |
Defined in Plutus.V1.Ledger.Interval Methods toJSON ∷ LowerBound a → Value # toEncoding ∷ LowerBound a → Encoding # toJSONList ∷ [LowerBound a] → Value # toEncodingList ∷ [LowerBound a] → Encoding # | |
| ToJSON a ⇒ ToJSON (UpperBound a) | |
Defined in Plutus.V1.Ledger.Interval Methods toJSON ∷ UpperBound a → Value # toEncoding ∷ UpperBound a → Encoding # toJSONList ∷ [UpperBound a] → Value # toEncodingList ∷ [UpperBound a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Ratio a) | |
Defined in PlutusTx.Ratio Methods toEncoding ∷ Ratio a → Encoding # toJSONList ∷ [Ratio a] → Value # toEncodingList ∷ [Ratio a] → Encoding # | |
| ToJSON (StakeCreds crypto) | |
Defined in Shelley.Spec.Ledger.TxBody Methods toJSON ∷ StakeCreds crypto → Value # toEncoding ∷ StakeCreds crypto → Encoding # toJSONList ∷ [StakeCreds crypto] → Value # toEncodingList ∷ [StakeCreds crypto] → Encoding # | |
| ToJSON (Stake crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ Stake crypto → Value # toEncoding ∷ Stake crypto → Encoding # toJSONList ∷ [Stake crypto] → Value # toEncodingList ∷ [Stake crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (RewardUpdate crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ RewardUpdate crypto → Value # toEncoding ∷ RewardUpdate crypto → Encoding # toJSONList ∷ [RewardUpdate crypto] → Value # toEncodingList ∷ [RewardUpdate crypto] → Encoding # | |
| ToJSON (Reward crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ Reward crypto → Value # toEncoding ∷ Reward crypto → Encoding # toJSONList ∷ [Reward crypto] → Value # toEncodingList ∷ [Reward crypto] → Encoding # | |
| ToJSON d ⇒ ToJSON (LinearTransform d) | |
Defined in Statistics.Distribution.Transform Methods toJSON ∷ LinearTransform d → Value # toEncoding ∷ LinearTransform d → Encoding # toJSONList ∷ [LinearTransform d] → Value # toEncodingList ∷ [LinearTransform d] → Encoding # | |
| SerialiseAsBech32 a ⇒ ToJSON (UsingBech32 a) Source # | |
Defined in Cardano.Api.SerialiseUsing Methods toJSON ∷ UsingBech32 a → Value # toEncoding ∷ UsingBech32 a → Encoding # toJSONList ∷ [UsingBech32 a] → Value # toEncodingList ∷ [UsingBech32 a] → Encoding # | |
| SerialiseAsRawBytes a ⇒ ToJSON (UsingRawBytesHex a) Source # | |
Defined in Cardano.Api.SerialiseUsing Methods toJSON ∷ UsingRawBytesHex a → Value # toEncoding ∷ UsingRawBytesHex a → Encoding # toJSONList ∷ [UsingRawBytesHex a] → Value # toEncodingList ∷ [UsingRawBytesHex a] → Encoding # | |
| ToJSON (SimpleScript lang) Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ SimpleScript lang → Value # toEncoding ∷ SimpleScript lang → Encoding # toJSONList ∷ [SimpleScript lang] → Value # toEncodingList ∷ [SimpleScript lang] → Encoding # | |
| IsCardanoEra era ⇒ ToJSON (AddressInEra era) Source # | |
Defined in Cardano.Api.Address Methods toJSON ∷ AddressInEra era → Value # toEncoding ∷ AddressInEra era → Encoding # toJSONList ∷ [AddressInEra era] → Value # toEncodingList ∷ [AddressInEra era] → Encoding # | |
| ToJSON (TxOutValue era) Source # | |
Defined in Cardano.Api.TxBody Methods toJSON ∷ TxOutValue era → Value # toEncoding ∷ TxOutValue era → Encoding # toJSONList ∷ [TxOutValue era] → Value # toEncodingList ∷ [TxOutValue era] → Encoding # | |
| ToJSON (MultiAssetSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods toJSON ∷ MultiAssetSupportedInEra era → Value # toEncoding ∷ MultiAssetSupportedInEra era → Encoding # toJSONList ∷ [MultiAssetSupportedInEra era] → Value # toEncodingList ∷ [MultiAssetSupportedInEra era] → Encoding # | |
| IsCardanoEra era ⇒ ToJSON (TxOut era) Source # | |
Defined in Cardano.Api.TxBody Methods toEncoding ∷ TxOut era → Encoding # toJSONList ∷ [TxOut era] → Value # toEncodingList ∷ [TxOut era] → Encoding # | |
| (IsShelleyBasedEra era, ShelleyLedgerEra era ~ ledgerera, ShelleyBasedEra ledgerera, ToJSON (PParams ledgerera), ToJSON (PParamsDelta ledgerera), ToJSON (TxOut ledgerera)) ⇒ ToJSON (DebugLedgerState era) Source # | |
Defined in Cardano.Api.Query Methods toJSON ∷ DebugLedgerState era → Value # toEncoding ∷ DebugLedgerState era → Encoding # toJSONList ∷ [DebugLedgerState era] → Value # toEncodingList ∷ [DebugLedgerState era] → Encoding # | |
| IsCardanoEra era ⇒ ToJSON (UTxO era) Source # | |
Defined in Cardano.Api.Query Methods toEncoding ∷ UTxO era → Encoding # toJSONList ∷ [UTxO era] → Value # toEncodingList ∷ [UTxO era] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (Either a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Either a b → Encoding # toJSONList ∷ [Either a b] → Value # toEncodingList ∷ [Either a b] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (a, b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ (a, b) → Encoding # toJSONList ∷ [(a, b)] → Value # toEncodingList ∷ [(a, b)] → Encoding # | |
| (ToJSON v, ToJSONKey k) ⇒ ToJSON (Map k v) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Map k v → Encoding # toJSONList ∷ [Map k v] → Value # toEncodingList ∷ [Map k v] → Encoding # | |
| ToJSON (Proxy a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Proxy a → Encoding # toJSONList ∷ [Proxy a] → Value # toEncodingList ∷ [Proxy a] → Encoding # | |
| HasResolution a ⇒ ToJSON (Fixed a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Fixed a → Encoding # toJSONList ∷ [Fixed a] → Value # toEncodingList ∷ [Fixed a] → Encoding # | |
| (ToJSON v, ToJSONKey k) ⇒ ToJSON (HashMap k v) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ HashMap k v → Value # toEncoding ∷ HashMap k v → Encoding # toJSONList ∷ [HashMap k v] → Value # toEncodingList ∷ [HashMap k v] → Encoding # | |
| ToJSON b ⇒ ToJSON (Annotated b a) | |
Defined in Cardano.Binary.Annotated Methods toJSON ∷ Annotated b a → Value # toEncoding ∷ Annotated b a → Encoding # toJSONList ∷ [Annotated b a] → Value # toEncodingList ∷ [Annotated b a] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (Either a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Either a b → Encoding # toJSONList ∷ [Either a b] → Value # toEncodingList ∷ [Either a b] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (These a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ These a b → Encoding # toJSONList ∷ [These a b] → Value # toEncodingList ∷ [These a b] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (These a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ These a b → Encoding # toJSONList ∷ [These a b] → Value # toEncodingList ∷ [These a b] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (Pair a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Pair a b → Encoding # toJSONList ∷ [Pair a b] → Value # toEncodingList ∷ [Pair a b] → Encoding # | |
| ToJSON (Hash crypto a) | |
Defined in Cardano.Crypto.Hash.Class Methods toJSON ∷ Hash crypto a → Value # toEncoding ∷ Hash crypto a → Encoding # toJSONList ∷ [Hash crypto a] → Value # toEncodingList ∷ [Hash crypto a] → Encoding # | |
| ToJSON (KeyHash disc crypto) | |
Defined in Cardano.Ledger.Keys Methods toJSON ∷ KeyHash disc crypto → Value # toEncoding ∷ KeyHash disc crypto → Encoding # toJSONList ∷ [KeyHash disc crypto] → Value # toEncodingList ∷ [KeyHash disc crypto] → Encoding # | |
| ToJSON (SafeHash c a) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ SafeHash c a → Value # toEncoding ∷ SafeHash c a → Encoding # toJSONList ∷ [SafeHash c a] → Value # toEncodingList ∷ [SafeHash c a] → Encoding # | |
| ToJSON (Credential kr crypto) | |
Defined in Cardano.Ledger.Credential Methods toJSON ∷ Credential kr crypto → Value # toEncoding ∷ Credential kr crypto → Encoding # toJSONList ∷ [Credential kr crypto] → Value # toEncodingList ∷ [Credential kr crypto] → Encoding # | |
| ToJSON (AbstractHash algo a) | |
Defined in Cardano.Crypto.Hashing Methods toJSON ∷ AbstractHash algo a → Value # toEncoding ∷ AbstractHash algo a → Encoding # toJSONList ∷ [AbstractHash algo a] → Value # toEncodingList ∷ [AbstractHash algo a] → Encoding # | |
| ToJSON (BoundedRatio b Word64) | |
Defined in Cardano.Ledger.BaseTypes Methods toJSON ∷ BoundedRatio b Word64 → Value # toEncoding ∷ BoundedRatio b Word64 → Encoding # toJSONList ∷ [BoundedRatio b Word64] → Value # toEncodingList ∷ [BoundedRatio b Word64] → Encoding # | |
| ToJSON (Bimap Ptr (Credential 'Staking crypto)) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ Bimap Ptr (Credential 'Staking crypto) → Value # toEncoding ∷ Bimap Ptr (Credential 'Staking crypto) → Encoding # toJSONList ∷ [Bimap Ptr (Credential 'Staking crypto)] → Value # toEncodingList ∷ [Bimap Ptr (Credential 'Staking crypto)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c) ⇒ ToJSON (a, b, c) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ (a, b, c) → Encoding # toJSONList ∷ [(a, b, c)] → Value # toEncodingList ∷ [(a, b, c)] → Encoding # | |
| ToJSON a ⇒ ToJSON (Const a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Const a b → Encoding # toJSONList ∷ [Const a b] → Value # toEncodingList ∷ [Const a b] → Encoding # | |
| ToJSON b ⇒ ToJSON (Tagged a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Tagged a b → Encoding # toJSONList ∷ [Tagged a b] → Value # toEncodingList ∷ [Tagged a b] → Encoding # | |
| (ToJSON1 f, ToJSON1 g, ToJSON a) ⇒ ToJSON (These1 f g a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ These1 f g a → Value # toEncoding ∷ These1 f g a → Encoding # toJSONList ∷ [These1 f g a] → Value # toEncodingList ∷ [These1 f g a] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d) ⇒ ToJSON (a, b, c, d) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d) → Value # toEncoding ∷ (a, b, c, d) → Encoding # toJSONList ∷ [(a, b, c, d)] → Value # toEncodingList ∷ [(a, b, c, d)] → Encoding # | |
| (ToJSON1 f, ToJSON1 g, ToJSON a) ⇒ ToJSON (Product f g a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ Product f g a → Value # toEncoding ∷ Product f g a → Encoding # toJSONList ∷ [Product f g a] → Value # toEncodingList ∷ [Product f g a] → Encoding # | |
| (ToJSON1 f, ToJSON1 g, ToJSON a) ⇒ ToJSON (Sum f g a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Sum f g a → Encoding # toJSONList ∷ [Sum f g a] → Value # toEncodingList ∷ [Sum f g a] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e) ⇒ ToJSON (a, b, c, d, e) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e) → Value # toEncoding ∷ (a, b, c, d, e) → Encoding # toJSONList ∷ [(a, b, c, d, e)] → Value # toEncodingList ∷ [(a, b, c, d, e)] → Encoding # | |
| (ToJSON1 f, ToJSON1 g, ToJSON a) ⇒ ToJSON (Compose f g a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ Compose f g a → Value # toEncoding ∷ Compose f g a → Encoding # toJSONList ∷ [Compose f g a] → Value # toEncodingList ∷ [Compose f g a] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f) ⇒ ToJSON (a, b, c, d, e, f) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f) → Value # toEncoding ∷ (a, b, c, d, e, f) → Encoding # toJSONList ∷ [(a, b, c, d, e, f)] → Value # toEncodingList ∷ [(a, b, c, d, e, f)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g) ⇒ ToJSON (a, b, c, d, e, f, g) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g) → Value # toEncoding ∷ (a, b, c, d, e, f, g) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h) ⇒ ToJSON (a, b, c, d, e, f, g, h) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i) ⇒ ToJSON (a, b, c, d, e, f, g, h, i) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k, l) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k, l) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k, l) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m, ToJSON n) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m, n) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m, n) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m, ToJSON n, ToJSON o) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] → Encoding # | |
Instances
serialiseToJSON ∷ ToJSON a ⇒ a → ByteString Source #
deserialiseFromJSON ∷ FromJSON a ⇒ AsType a → ByteString → Either JsonDecodeError a Source #
newtype JsonDecodeError Source #
Constructors
| JsonDecodeError String |
Instances
| Eq JsonDecodeError Source # | |
Defined in Cardano.Api.SerialiseJSON Methods (==) ∷ JsonDecodeError → JsonDecodeError → Bool # (/=) ∷ JsonDecodeError → JsonDecodeError → Bool # | |
| Show JsonDecodeError Source # | |
Defined in Cardano.Api.SerialiseJSON Methods showsPrec ∷ Int → JsonDecodeError → ShowS # show ∷ JsonDecodeError → String # showList ∷ [JsonDecodeError] → ShowS # | |
| Error JsonDecodeError Source # | |
Defined in Cardano.Api.SerialiseJSON Methods | |
readFileJSON ∷ FromJSON a ⇒ AsType a → FilePath → IO (Either (FileError JsonDecodeError) a) Source #
prettyPrintJSON ∷ ToJSON a ⇒ a → ByteString Source #
Bech32
class (HasTypeProxy a, SerialiseAsRawBytes a) ⇒ SerialiseAsBech32 a Source #
Minimal complete definition
Instances
serialiseToBech32 ∷ SerialiseAsBech32 a ⇒ a → Text Source #
deserialiseFromBech32 ∷ SerialiseAsBech32 a ⇒ AsType a → Text → Either Bech32DecodeError a Source #
deserialiseAnyOfFromBech32 ∷ ∀ b. [FromSomeType SerialiseAsBech32 b] → Text → Either Bech32DecodeError b Source #
data Bech32DecodeError Source #
Bech32 decoding error.
Constructors
| Bech32DecodingError !DecodingError | There was an error decoding the string as Bech32. |
| Bech32UnexpectedPrefix !Text !(Set Text) | The human-readable prefix in the Bech32-encoded string is not one of the ones expected. |
| Bech32DataPartToBytesError !Text | There was an error in extracting a |
| Bech32DeserialiseFromBytesError !ByteString | There was an error in deserialising the bytes into a value of the expected type. |
| Bech32WrongPrefix !Text !Text | The human-readable prefix in the Bech32-encoded string does not correspond to the prefix that should be used for the payload value. |
Instances
| Eq Bech32DecodeError Source # | |
Defined in Cardano.Api.SerialiseBech32 Methods | |
| Show Bech32DecodeError Source # | |
Defined in Cardano.Api.SerialiseBech32 Methods showsPrec ∷ Int → Bech32DecodeError → ShowS # show ∷ Bech32DecodeError → String # showList ∷ [Bech32DecodeError] → ShowS # | |
| Error Bech32DecodeError Source # | |
Defined in Cardano.Api.SerialiseBech32 Methods | |
Addresses
Address serialisation is (sadly) special
class HasTypeProxy addr ⇒ SerialiseAddress addr Source #
Address serialisation uses different serialisation formats for different kinds of addresses, so it needs its own class.
In particular, Byron addresses are typically formatted in base 58, while Shelley addresses (payment and stake) are formatted using Bech32.
Minimal complete definition
Instances
| SerialiseAddress StakeAddress Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ StakeAddress → Text Source # deserialiseAddress ∷ AsType StakeAddress → Text → Maybe StakeAddress Source # | |
| SerialiseAddress AddressAny Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ AddressAny → Text Source # deserialiseAddress ∷ AsType AddressAny → Text → Maybe AddressAny Source # | |
| IsCardanoEra era ⇒ SerialiseAddress (AddressInEra era) Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ AddressInEra era → Text Source # deserialiseAddress ∷ AsType (AddressInEra era) → Text → Maybe (AddressInEra era) Source # | |
| SerialiseAddress (Address ShelleyAddr) Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ Address ShelleyAddr → Text Source # deserialiseAddress ∷ AsType (Address ShelleyAddr) → Text → Maybe (Address ShelleyAddr) Source # | |
| SerialiseAddress (Address ByronAddr) Source # | |
serialiseAddress ∷ SerialiseAddress addr ⇒ addr → Text Source #
deserialiseAddress ∷ SerialiseAddress addr ⇒ AsType addr → Text → Maybe addr Source #
Raw binary
Some types have a natural raw binary format.
class HasTypeProxy a ⇒ SerialiseAsRawBytes a Source #
Minimal complete definition
Instances
serialiseToRawBytes ∷ SerialiseAsRawBytes a ⇒ a → ByteString Source #
deserialiseFromRawBytes ∷ SerialiseAsRawBytes a ⇒ AsType a → ByteString → Maybe a Source #
deserialiseFromRawBytesHex ∷ SerialiseAsRawBytes a ⇒ AsType a → ByteString → Maybe a Source #
serialiseToRawBytesHexText ∷ SerialiseAsRawBytes a ⇒ a → Text Source #
Text envelope
Support for a envelope file format with text headers and a hex-encoded binary payload.
class SerialiseAsCBOR a ⇒ HasTextEnvelope a where Source #
Minimal complete definition
Methods
Instances
data TextEnvelope Source #
A TextEnvelope is a structured envelope for serialised binary values
with an external format with a semi-readable textual format.
It contains a "type" field, e.g. "PublicKeyByron" or "TxSignedShelley" to indicate the type of the encoded data. This is used as a sanity check and to help readers.
It also contains a "title" field which is free-form, and could be used to indicate the role or purpose to a reader.
Constructors
| TextEnvelope | |
Fields | |
Instances
| Eq TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope | |
| Show TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods showsPrec ∷ Int → TextEnvelope → ShowS # show ∷ TextEnvelope → String # showList ∷ [TextEnvelope] → ShowS # | |
| FromJSON TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope | |
| ToJSON TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods toJSON ∷ TextEnvelope → Value # toEncoding ∷ TextEnvelope → Encoding # toJSONList ∷ [TextEnvelope] → Value # toEncodingList ∷ [TextEnvelope] → Encoding # | |
| HasTypeProxy TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Associated Types data AsType TextEnvelope Source # Methods proxyToAsType ∷ Proxy TextEnvelope → AsType TextEnvelope Source # | |
| data AsType TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope | |
newtype TextEnvelopeType Source #
Constructors
| TextEnvelopeType String |
Instances
data TextEnvelopeDescr Source #
Instances
data TextEnvelopeError Source #
The errors that the pure TextEnvelope parsing/decoding functions can return.
Constructors
| TextEnvelopeTypeError ![TextEnvelopeType] !TextEnvelopeType | expected, actual |
| TextEnvelopeDecodeError !DecoderError | |
| TextEnvelopeAesonDecodeError !String |
Instances
| Eq TextEnvelopeError Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods | |
| Show TextEnvelopeError Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods showsPrec ∷ Int → TextEnvelopeError → ShowS # show ∷ TextEnvelopeError → String # showList ∷ [TextEnvelopeError] → ShowS # | |
| Error TextEnvelopeError Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods | |
serialiseToTextEnvelope ∷ ∀ a. HasTextEnvelope a ⇒ Maybe TextEnvelopeDescr → a → TextEnvelope Source #
deserialiseFromTextEnvelope ∷ HasTextEnvelope a ⇒ AsType a → TextEnvelope → Either TextEnvelopeError a Source #
readFileTextEnvelope ∷ HasTextEnvelope a ⇒ AsType a → FilePath → IO (Either (FileError TextEnvelopeError) a) Source #
writeFileTextEnvelope ∷ HasTextEnvelope a ⇒ FilePath → Maybe TextEnvelopeDescr → a → IO (Either (FileError ()) ()) Source #
writeFileTextEnvelopeWithOwnerPermissions ∷ HasTextEnvelope a ⇒ FilePath → Maybe TextEnvelopeDescr → a → IO (Either (FileError ()) ()) Source #
readTextEnvelopeFromFile ∷ FilePath → IO (Either (FileError TextEnvelopeError) TextEnvelope) Source #
readTextEnvelopeOfTypeFromFile ∷ TextEnvelopeType → FilePath → IO (Either (FileError TextEnvelopeError) TextEnvelope) Source #
Reading one of several key types
data FromSomeType (c ∷ Type → Constraint) b where Source #
Constructors
| FromSomeType ∷ c a ⇒ AsType a → (a → b) → FromSomeType c b |
deserialiseFromTextEnvelopeAnyOf ∷ [FromSomeType HasTextEnvelope b] → TextEnvelope → Either TextEnvelopeError b Source #
readFileTextEnvelopeAnyOf ∷ [FromSomeType HasTextEnvelope b] → FilePath → IO (Either (FileError TextEnvelopeError) b) Source #
Errors
class Show e ⇒ Error e where Source #
Methods
displayError ∷ e → String Source #
Instances
throwErrorAsException ∷ Error e ⇒ e → IO a Source #
The preferred approach is to use Except or ExceptT, but you can if
necessary use IO exceptions.
Constructors
| FileError FilePath e | |
| FileErrorTempFile | |
| FileIOError FilePath IOException | |
Instances
Node interaction
Operations that involve talking to a local Cardano node.
Queries
Submitting transactions
High level protocol interaction with a Cardano node
Initialization / Accumulation
Constructors
| Env | |
Fields
| |
envSecurityParam ∷ Env → Word64 Source #
newtype LedgerState Source #
Constructors
| LedgerState | |
Fields
| |
Bundled Patterns
| pattern LedgerStateByron ∷ LedgerState ByronBlock → LedgerState | |
| pattern LedgerStateShelley ∷ LedgerState (ShelleyBlock (ShelleyEra StandardCrypto)) → LedgerState | |
| pattern LedgerStateAllegra ∷ LedgerState (ShelleyBlock (AllegraEra StandardCrypto)) → LedgerState | |
| pattern LedgerStateMary ∷ LedgerState (ShelleyBlock (MaryEra StandardCrypto)) → LedgerState |
Arguments
| ∷ FilePath | Path to the cardano-node config file (e.g. to cardano-node projectconfigurationcardano/mainnet-config.json) |
| → ExceptT InitialLedgerStateError IO (Env, LedgerState) | The environment and initial ledger state |
Get the environment and initial ledger state.
Arguments
| ∷ Env | The environment returned by |
| → LedgerState | The current ledger state |
| → Bool | True to perform validation. If True, |
| → Block era | Some block to apply |
| → Either Text LedgerState | The new ledger state (or an error). |
Apply a single block to the current ledger state.
Traversing the block chain
Arguments
| ∷ ∀ a. FilePath | Path to the cardano-node config file (e.g. to cardano-node projectconfigurationcardano/mainnet-config.json) |
| → FilePath | Path to local cardano-node socket. This is the path specified by the |
| → NetworkId | The network ID. |
| → Bool | True to enable validation. Under the hood this will use |
| → a | The initial accumulator state. |
| → (Env → LedgerState → BlockInMode CardanoMode → a → IO a) | Accumulator function Takes: * Environment (this is a constant over the whole fold) * The current Ledger state (with the current block applied) * The current Block * The previous state And this should return the new state. Note: This function can safely assume no rollback will occur even though internally this is implemented with a client protocol that may require rollback. This is achieved by only calling the accumulator on states/blocks that are older than the security parameter, k. This has the side effect of truncating the last k blocks before the node's tip. |
| → ExceptT FoldBlocksError IO a | The final state |
Monadic fold over all blocks and ledger states. Stopping k blocks before
the node's tip where k is the security parameter.
Errors
data FoldBlocksError Source #
data GenesisConfigError Source #
Constructors
| NEError !Text | |
| NEByronConfig !FilePath !ConfigurationError | |
| NEShelleyConfig !FilePath !Text | |
| NECardanoConfig !Text |
data InitialLedgerStateError Source #
Constructors
| ILSEConfigFile Text | Failed to read or parse the network config file. |
| ILSEGenesisFile GenesisConfigError | Failed to read or parse a genesis file linked from the network config file. |
| ILSELedgerConsensusConfig GenesisConfigError | Failed to derive the Ledger or Consensus config. |
Low level protocol interaction with a Cardano node
connectToLocalNode ∷ LocalNodeConnectInfo mode → LocalNodeClientProtocolsInMode mode → IO () Source #
Establish a connection to a local node and execute the given set of protocol handlers.
connectToLocalNodeWithVersion ∷ LocalNodeConnectInfo mode → (NodeToClientVersion → LocalNodeClientProtocolsInMode mode) → IO () Source #
Establish a connection to a local node and execute the given set of protocol handlers parameterized on the negotiated node-to-client protocol version.
data LocalNodeConnectInfo mode Source #
Constructors
| LocalNodeConnectInfo | |
data AnyConsensusMode where Source #
Constructors
| AnyConsensusMode ∷ ConsensusMode mode → AnyConsensusMode |
Instances
| Show AnyConsensusMode Source # | |
Defined in Cardano.Api.Modes Methods showsPrec ∷ Int → AnyConsensusMode → ShowS # show ∷ AnyConsensusMode → String # showList ∷ [AnyConsensusMode] → ShowS # | |
data ConsensusMode mode where Source #
This GADT provides a value-level representation of all the consensus modes. This enables pattern matching on the era to allow them to be treated in a non-uniform way.
Constructors
| CardanoMode ∷ ConsensusMode CardanoMode |
Instances
| Show (ConsensusMode mode) Source # | |
Defined in Cardano.Api.Modes Methods showsPrec ∷ Int → ConsensusMode mode → ShowS # show ∷ ConsensusMode mode → String # showList ∷ [ConsensusMode mode] → ShowS # | |
consensusModeOnly ∷ ConsensusModeParams mode → ConsensusMode mode Source #
data ConsensusModeIsMultiEra mode where Source #
The subset of consensus modes that consist of multiple eras. Some features are not supported in single-era modes (for exact compatibility with not using the hard fork combinatior at all).
Constructors
| CardanoModeIsMultiEra ∷ ConsensusModeIsMultiEra CardanoMode |
Instances
| Show (ConsensusModeIsMultiEra mode) Source # | |
Defined in Cardano.Api.Modes Methods showsPrec ∷ Int → ConsensusModeIsMultiEra mode → ShowS # show ∷ ConsensusModeIsMultiEra mode → String # showList ∷ [ConsensusModeIsMultiEra mode] → ShowS # | |
data AnyConsensusModeParams where Source #
Constructors
| AnyConsensusModeParams ∷ ConsensusModeParams mode → AnyConsensusModeParams |
Instances
| Show AnyConsensusModeParams Source # | |
Defined in Cardano.Api.Modes Methods showsPrec ∷ Int → AnyConsensusModeParams → ShowS # show ∷ AnyConsensusModeParams → String # showList ∷ [AnyConsensusModeParams] → ShowS # | |
data ConsensusModeParams mode where Source #
The consensus-mode-specific parameters needed to connect to a local node that is using each consensus mode.
It is in fact only the Byron era that requires extra parameters, but this is
of course inherited by the CardanoMode that uses the Byron era. The reason
this parameter is needed stems from unfortunate design decisions from the
legacy Byron era. The slots per epoch are needed to be able to decode
epoch boundary blocks from the Byron era.
It is possible in future that we may be able to eliminate this parameter by discovering it from the node during the initial handshake.
Constructors
| ByronModeParams ∷ EpochSlots → ConsensusModeParams ByronMode | |
| ShelleyModeParams ∷ ConsensusModeParams ShelleyMode | |
| CardanoModeParams ∷ EpochSlots → ConsensusModeParams CardanoMode |
Instances
| Show (ConsensusModeParams mode) Source # | |
Defined in Cardano.Api.Modes Methods showsPrec ∷ Int → ConsensusModeParams mode → ShowS # show ∷ ConsensusModeParams mode → String # showList ∷ [ConsensusModeParams mode] → ShowS # | |
data EraInMode era mode where Source #
A representation of which CardanoEras are included in each
ConsensusMode.
Constructors
toEraInMode ∷ CardanoEra era → ConsensusMode mode → Maybe (EraInMode era mode) Source #
data LocalNodeClientProtocols block point tip tx txerr query m Source #
The protocols we can use with a local node. Use in conjunction with
connectToLocalNode.
These protocols use the types from the rest of this API. The conversion
to/from the types used by the underlying wire formats is handled by
connectToLocalNode.
Constructors
| LocalNodeClientProtocols | |
Fields
| |
data LocalChainSyncClient block point tip m Source #
Constructors
| NoLocalChainSyncClient | |
| LocalChainSyncClientPipelined (ChainSyncClientPipelined block point tip m ()) | |
| LocalChainSyncClient (ChainSyncClient block point tip m ()) |
data CardanoMode Source #
The Cardano consensus mode consists of all the eras currently in use on
the Cardano mainnet. This is currently: the ByronEra; ShelleyEra,
AllegraEra and MaryEra, in that order.
This mode will be extended with new eras as the Cardano mainnet develops.
Chain sync protocol
To construct a ChainSyncClient see Cardano.Api.Client or
Cardano.Api.ClientPipelined.
newtype ChainSyncClient header point tip (m ∷ Type → Type) a #
Constructors
| ChainSyncClient | |
Fields
| |
newtype ChainSyncClientPipelined header point tip (m ∷ Type → Type) a #
Constructors
| ChainSyncClientPipelined | |
Fields
| |
data BlockInMode mode where Source #
A Block in one of the eras supported by a given protocol mode.
For multi-era modes such as the CardanoMode this type is a sum of the
different block types for all the eras. It is used in the ChainSync protocol.
Constructors
| BlockInMode ∷ Block era → EraInMode era mode → BlockInMode mode |
Instances
| Show (BlockInMode mode) Source # | |
Defined in Cardano.Api.Block Methods showsPrec ∷ Int → BlockInMode mode → ShowS # show ∷ BlockInMode mode → String # showList ∷ [BlockInMode mode] → ShowS # | |
type LocalNodeClientProtocolsInMode mode = LocalNodeClientProtocols (BlockInMode mode) ChainPoint ChainTip (TxInMode mode) (TxValidationErrorInMode mode) (QueryInMode mode) IO Source #
Local tx submission
data LocalTxSubmissionClient tx reject (m ∷ Type → Type) a #
data TxInMode mode where Source #
A Tx in one of the eras supported by a given protocol mode.
For multi-era modes such as the CardanoMode this type is a sum of the
different transaction types for all the eras. It is used in the
LocalTxSubmission protocol.
Constructors
| TxInMode ∷ Tx era → EraInMode era mode → TxInMode mode | Everything we consider a normal transaction. |
| TxInByronSpecial ∷ GenTx ByronBlock → EraInMode ByronEra mode → TxInMode mode | Byron has various things we can post to the chain which are not actually transactions. This covers: update proposals, votes and delegation certs. |
data TxValidationErrorInMode mode where Source #
A TxValidationError in one of the eras supported by a given protocol
mode.
This is used in the LocalStateQuery protocol.
Constructors
| TxValidationErrorInMode ∷ TxValidationError era → EraInMode era mode → TxValidationErrorInMode mode | |
| TxValidationEraMismatch ∷ EraMismatch → TxValidationErrorInMode mode |
Instances
| Show (TxValidationErrorInMode mode) Source # | |
Defined in Cardano.Api.TxInMode Methods showsPrec ∷ Int → TxValidationErrorInMode mode → ShowS # show ∷ TxValidationErrorInMode mode → String # showList ∷ [TxValidationErrorInMode mode] → ShowS # | |
runLocalTxSubmissionClient ∷ LocalTxSubmissionClient tx reject m a → m (LocalTxClientStIdle tx reject m a) #
submitTxToNodeLocal ∷ ∀ mode. LocalNodeConnectInfo mode → TxInMode mode → IO (SubmitResult (TxValidationErrorInMode mode)) Source #
Local state query
newtype LocalStateQueryClient block point (query ∷ Type → Type) (m ∷ Type → Type) a #
Constructors
| LocalStateQueryClient | |
Fields
| |
data QueryInMode mode result where Source #
Constructors
| QueryCurrentEra ∷ ConsensusModeIsMultiEra mode → QueryInMode mode AnyCardanoEra | |
| QueryInEra ∷ EraInMode era mode → QueryInEra era result → QueryInMode mode (Either EraMismatch result) | |
| QueryEraHistory ∷ ConsensusModeIsMultiEra mode → QueryInMode mode (EraHistory mode) | |
| QuerySystemStart ∷ QueryInMode mode SystemStart |
Instances
| Show (QueryInMode mode result) Source # | |
Defined in Cardano.Api.Query Methods showsPrec ∷ Int → QueryInMode mode result → ShowS # show ∷ QueryInMode mode result → String # showList ∷ [QueryInMode mode result] → ShowS # | |
data QueryInEra era result where Source #
Constructors
| QueryByronUpdateState ∷ QueryInEra ByronEra ByronUpdateState | |
| QueryInShelleyBasedEra ∷ ShelleyBasedEra era → QueryInShelleyBasedEra era result → QueryInEra era result |
Instances
| Show (QueryInEra era result) Source # | |
Defined in Cardano.Api.Query Methods showsPrec ∷ Int → QueryInEra era result → ShowS # show ∷ QueryInEra era result → String # showList ∷ [QueryInEra era result] → ShowS # | |
data QueryInShelleyBasedEra era result where Source #
Constructors
Instances
| Show (QueryInShelleyBasedEra era result) Source # | |
Defined in Cardano.Api.Query Methods showsPrec ∷ Int → QueryInShelleyBasedEra era result → ShowS # show ∷ QueryInShelleyBasedEra era result → String # showList ∷ [QueryInShelleyBasedEra era result] → ShowS # | |
data QueryUTxOFilter Source #
Getting the whole UTxO is obviously not efficient since the result can be huge. Filtering by address is also not efficient because it requires a linear search.
The QueryUTxOFilterByTxIn is efficient since it fits with the structure of
the UTxO (which is indexed by TxIn).
Constructors
| QueryUTxOWhole | O(n) time and space for utxo size n |
| QueryUTxOByAddress (Set AddressAny) | O(n) time, O(m) space for utxo size n, and address set size m |
| QueryUTxOByTxIn (Set TxIn) | O(m log n) time, O(m) space for utxo size n, and address set size m |
Instances
| Eq QueryUTxOFilter Source # | |
Defined in Cardano.Api.Query Methods (==) ∷ QueryUTxOFilter → QueryUTxOFilter → Bool # (/=) ∷ QueryUTxOFilter → QueryUTxOFilter → Bool # | |
| Show QueryUTxOFilter Source # | |
Defined in Cardano.Api.Query Methods showsPrec ∷ Int → QueryUTxOFilter → ShowS # show ∷ QueryUTxOFilter → String # showList ∷ [QueryUTxOFilter] → ShowS # | |
Instances
| IsCardanoEra era ⇒ ToJSON (UTxO era) Source # | |
Defined in Cardano.Api.Query Methods toEncoding ∷ UTxO era → Encoding # toJSONList ∷ [UTxO era] → Value # toEncodingList ∷ [UTxO era] → Encoding # | |
queryNodeLocalState ∷ ∀ mode result. LocalNodeConnectInfo mode → Maybe ChainPoint → QueryInMode mode result → IO (Either AcquireFailure result) Source #
Establish a connection to a node and execute a single query using the local state query protocol.
data EraHistory mode where Source #
Constructors
| EraHistory ∷ ConsensusBlockForMode mode ~ HardForkBlock xs ⇒ ConsensusMode mode → Interpreter xs → EraHistory mode |
getProgress ∷ SlotNo → EraHistory mode → Either PastHorizonException (RelativeTime, SlotLength) Source #
Common queries
getLocalChainTip ∷ LocalNodeConnectInfo mode → IO ChainTip Source #
Node operation
Support for the steps needed to operate a node
Operational certificates
data OperationalCertificate Source #
Instances
data OperationalCertificateIssueCounter Source #
Instances
| Eq OperationalCertificateIssueCounter Source # | |
| Show OperationalCertificateIssueCounter Source # | |
Defined in Cardano.Api.OperationalCertificate | |
| FromCBOR OperationalCertificateIssueCounter Source # | |
Defined in Cardano.Api.OperationalCertificate Methods fromCBOR ∷ Decoder s OperationalCertificateIssueCounter # | |
| ToCBOR OperationalCertificateIssueCounter Source # | |
Defined in Cardano.Api.OperationalCertificate Methods toCBOR ∷ OperationalCertificateIssueCounter → Encoding # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy OperationalCertificateIssueCounter → Size # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [OperationalCertificateIssueCounter] → Size # | |
| HasTypeProxy OperationalCertificateIssueCounter Source # | |
Defined in Cardano.Api.OperationalCertificate Associated Types | |
| SerialiseAsCBOR OperationalCertificateIssueCounter Source # | |
| HasTextEnvelope OperationalCertificateIssueCounter Source # | |
| data AsType OperationalCertificateIssueCounter Source # | |
data OperationalCertIssueError Source #
Instances
| Show OperationalCertIssueError Source # | |
Defined in Cardano.Api.OperationalCertificate Methods showsPrec ∷ Int → OperationalCertIssueError → ShowS # | |
| Error OperationalCertIssueError Source # | |
Defined in Cardano.Api.OperationalCertificate Methods | |
issueOperationalCertificate ∷ VerificationKey KesKey → Either (SigningKey StakePoolKey) (SigningKey GenesisDelegateExtendedKey) → KESPeriod → OperationalCertificateIssueCounter → Either OperationalCertIssueError (OperationalCertificate, OperationalCertificateIssueCounter) Source #
Genesis file
Types and functions needed to inspect or create a genesis file.
data GenesisKey Source #
Instances
data GenesisExtendedKey Source #
Shelley-era genesis keys using extended ed25519 cryptographic keys.
These serve the same role as normal genesis keys, but are here to support legacy Byron genesis keys which used extended keys.
The extended verification keys can be converted (via castVerificationKey)
to ordinary keys (i.e. VerificationKey GenesisKey) but this is not the
case for the signing keys. The signing keys can be used to witness
transactions directly, with verification via their non-extended verification
key (VerificationKey GenesisKey).
This is a type level tag, used with other interfaces like Key.
Instances
data GenesisDelegateKey Source #
Instances
data GenesisDelegateExtendedKey Source #
Shelley-era genesis keys using extended ed25519 cryptographic keys.
These serve the same role as normal genesis keys, but are here to support legacy Byron genesis keys which used extended keys.
The extended verification keys can be converted (via castVerificationKey)
to ordinary keys (i.e. VerificationKey GenesisKey) but this is not the
case for the signing keys. The signing keys can be used to witness
transactions directly, with verification via their non-extended verification
key (VerificationKey GenesisKey).
This is a type level tag, used with other interfaces like Key.
Instances
data GenesisUTxOKey Source #
Instances
genesisUTxOPseudoTxIn ∷ NetworkId → Hash GenesisUTxOKey → TxIn Source #
Compute the TxIn of the initial UTxO pseudo-transaction corresponding
to the given address in the genesis initial funds.
The Shelley initial UTxO is constructed from the sgInitialFunds which
is not a full UTxO but just a map from addresses to coin values.
This gets turned into a UTxO by making a pseudo-transaction for each address,
with the 0th output being the coin value. So to spend from the initial UTxO
we need this same TxIn to use as an input to the spending transaction.
Genesis paramaters
data GenesisParameters Source #
Constructors
| GenesisParameters | |
Fields
| |
Special transactions
There are various additional things that can be embedded in a transaction for special operations.
makeMIRCertificate ∷ MIRPot → MIRTarget → Certificate Source #
makeGenesisKeyDelegationCertificate ∷ Hash GenesisKey → Hash GenesisDelegateKey → Hash VrfKey → Certificate Source #
The MIRTarget determines the target of a MIRCertificate.
A MIRCertificate moves lovelace from either the reserves or the treasury
to either a collection of stake credentials or to the other pot.
Constructors
| StakeAddressesMIR [(StakeCredential, Lovelace)] | Use |
| SendToReservesMIR Lovelace | Use |
| SendToTreasuryMIR Lovelace | Use |
Protocol parameter updates
data UpdateProposal Source #
Constructors
| UpdateProposal !(Map (Hash GenesisKey) ProtocolParametersUpdate) !EpochNo |
Instances
data ProtocolParametersUpdate Source #
The representation of a change in the ProtocolParameters.
Constructors
| ProtocolParametersUpdate | |
Fields
| |
Instances
| Eq ProtocolParametersUpdate Source # | |
Defined in Cardano.Api.ProtocolParameters | |
| Show ProtocolParametersUpdate Source # | |
Defined in Cardano.Api.ProtocolParameters Methods showsPrec ∷ Int → ProtocolParametersUpdate → ShowS # | |
| Semigroup ProtocolParametersUpdate Source # | |
| Monoid ProtocolParametersUpdate Source # | |
| FromCBOR ProtocolParametersUpdate Source # | |
Defined in Cardano.Api.ProtocolParameters Methods fromCBOR ∷ Decoder s ProtocolParametersUpdate # | |
| ToCBOR ProtocolParametersUpdate Source # | |
Defined in Cardano.Api.ProtocolParameters Methods toCBOR ∷ ProtocolParametersUpdate → Encoding # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy ProtocolParametersUpdate → Size # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ProtocolParametersUpdate] → Size # | |
makeShelleyUpdateProposal ∷ ProtocolParametersUpdate → [Hash GenesisKey] → EpochNo → UpdateProposal Source #
data PraosNonce Source #
Instances
newtype NetworkMagic #
Constructors
| NetworkMagic | |
Fields | |
Instances
| Eq NetworkMagic | |
Defined in Ouroboros.Network.Magic | |
| Show NetworkMagic | |
Defined in Ouroboros.Network.Magic Methods showsPrec ∷ Int → NetworkMagic → ShowS # show ∷ NetworkMagic → String # showList ∷ [NetworkMagic] → ShowS # | |
| Generic NetworkMagic | |
Defined in Ouroboros.Network.Magic Associated Types type Rep NetworkMagic ∷ Type → Type # | |
| NoThunks NetworkMagic | |
Defined in Ouroboros.Network.Magic Methods noThunks ∷ Context → NetworkMagic → IO (Maybe ThunkInfo) wNoThunks ∷ Context → NetworkMagic → IO (Maybe ThunkInfo) | |
| type Rep NetworkMagic | |
Defined in Ouroboros.Network.Magic type Rep NetworkMagic = D1 ('MetaData "NetworkMagic" "Ouroboros.Network.Magic" "ouroboros-network-0.1.0.0-7710222e22cd20be1ca3769dc60b1617c9d1b1c85354a2685f650f54b974c9bf" 'True) (C1 ('MetaCons "NetworkMagic" 'PrefixI 'True) (S1 ('MetaSel ('Just "unNetworkMagic") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32))) | |
Conversions
data SomeNodeClientProtocol where Source #
Constructors
| SomeNodeClientProtocol ∷ (RunNode blk, ProtocolClient blk) ⇒ ProtocolClientInfoArgs blk → SomeNodeClientProtocol |
newtype SlotsInEpoch Source #
Constructors
| SlotsInEpoch Word64 |
newtype SlotsToEpochEnd Source #
Constructors
| SlotsToEpochEnd Word64 |
slotToEpoch ∷ SlotNo → EraHistory mode → Either PastHorizonException (EpochNo, SlotsInEpoch, SlotsToEpochEnd) Source #
data NodeToClientVersion #
Constructors
| NodeToClientV_1 | |
| NodeToClientV_2 | |
| NodeToClientV_3 | |
| NodeToClientV_4 | |
| NodeToClientV_5 | |
| NodeToClientV_6 | |
| NodeToClientV_7 | |
| NodeToClientV_8 | |
| NodeToClientV_9 |